mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Enable debug information for Vulkan shaders (#3193)
* Enable debug information for Vulkan shaders * Enable debug information for Metal shaders
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user