shaderc: Added --disasm flag support for GLSL.

This commit is contained in:
Branimir Karadžić 2016-04-30 11:44:38 -07:00
parent 32a9594134
commit cdf87ab691
1 changed files with 7 additions and 0 deletions

View File

@ -208,6 +208,13 @@ namespace bgfx
uint8_t nul = 0;
bx::write(_writer, nul);
if (_cmdLine.hasArg('\0', "disasm") )
{
std::string disasmfp = _cmdLine.findOption('o');
disasmfp += ".disasm";
writeFile(disasmfp.c_str(), optimizedShader, shaderSize);
}
glslopt_cleanup(ctx);
return true;