shaderc: Split Metal and SPIRV compilers.

This commit is contained in:
Бранимир Караџић 2019-08-03 08:52:14 -07:00
parent d6955a0297
commit 564f484ab7
2 changed files with 7 additions and 2 deletions

View File

@ -1479,9 +1479,13 @@ namespace bgfx
code += _comment;
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)
{

View File

@ -167,6 +167,7 @@ namespace bgfx
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 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 compileSPIRVShader(const Options& _options, uint32_t _version, const std::string& _code, bx::WriterI* _writer);