Skip to content

Commit 2de861f

Browse files
SPIRVTools: do not run SPIRV validation in release build
1 parent 68e441e commit 2de861f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Graphics/ShaderTools/src/SPIRVTools.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ std::vector<uint32_t> OptimizeSPIRV(const std::vector<uint32_t>& SrcSPIRV, spv_t
118118
SpirvOptimizer.SetMessageConsumer(SpvOptimizerMessageConsumer);
119119

120120
spvtools::OptimizerOptions Options;
121+
#ifndef DILIGENT_DEVELOPMENT
122+
// Do not run validator in release build
123+
Options.set_run_validator(false);
124+
#endif
121125

122126
// SPIR-V bytecode generated from HLSL must be legalized to
123127
// turn it into a valid vulkan SPIR-V shader.

0 commit comments

Comments
 (0)