SPV: Add option for controling when the SPIRV-Tools validator is used.

This commit is contained in:
John Kessenich
2018-08-23 15:29:08 -06:00
parent 717c80a9de
commit c340425bb2
6 changed files with 20 additions and 7 deletions

View File

@@ -7015,7 +7015,8 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsign
it.dumpSpv(spirv);
#if ENABLE_OPT
SpirvToolsValidate(intermediate, spirv, logger);
if (options->validate)
SpirvToolsValidate(intermediate, spirv, logger);
// If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan
// eg. forward and remove memory writes of opaque types.