Enable debug information for Vulkan shaders (#3193)

* Enable debug information for Vulkan shaders

* Enable debug information for Metal shaders
This commit is contained in:
Edu Garcia
2023-11-06 19:14:29 +00:00
committed by GitHub
parent a23b128ae2
commit b01c5d597a
4 changed files with 20 additions and 4 deletions

View File

@@ -461,6 +461,7 @@ namespace bgfx { namespace spirv
| EShMsgReadHlsl
| EShMsgVulkanRules
| EShMsgSpvRules
| EShMsgDebugInfo
);
shader->setEntryPoint("main");
@@ -704,7 +705,10 @@ namespace bgfx { namespace spirv
std::vector<uint32_t> spirv;
glslang::SpvOptions options;
options.disableOptimizer = false;
options.disableOptimizer = _options.debugInformation;
options.generateDebugInfo = _options.debugInformation;
options.emitNonSemanticShaderDebugInfo = _options.debugInformation;
options.emitNonSemanticShaderDebugSource = _options.debugInformation;
glslang::GlslangToSpv(*intermediate, spirv, &options);