mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc: Split Metal and SPIRV compilers.
This commit is contained in:
@@ -1479,9 +1479,13 @@ namespace bgfx
|
|||||||
code += _comment;
|
code += _comment;
|
||||||
code += preprocessor.m_preprocessed;
|
code += preprocessor.m_preprocessed;
|
||||||
|
|
||||||
if (0 != spirv || 0 != metal)
|
if (0 != metal)
|
||||||
{
|
{
|
||||||
compiled = compileSPIRVShader(_options, metal ? BX_MAKEFOURCC('M', 'T', 'L', 0) : 0, code, _writer);
|
compiled = compileMetalShader(_options, BX_MAKEFOURCC('M', 'T', 'L', 0), code, _writer);
|
||||||
|
}
|
||||||
|
else if (0 != spirv)
|
||||||
|
{
|
||||||
|
compiled = compileSPIRVShader(_options, 0, code, _writer);
|
||||||
}
|
}
|
||||||
else if (0 != pssl)
|
else if (0 != pssl)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ namespace bgfx
|
|||||||
|
|
||||||
bool compileGLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
bool compileGLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
||||||
bool compileHLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
bool compileHLSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
||||||
|
bool compileMetalShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
||||||
bool compilePSSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
bool compilePSSLShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
||||||
bool compileSPIRVShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
bool compileSPIRVShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user