Legalization: Fix warnings and disable tests when spirv-tools not present
This commit is contained in:
parent
3ddcd3f12f
commit
52fe3d598c
@ -896,8 +896,8 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
|
|||||||
glslang::SpvOptions spvOptions;
|
glslang::SpvOptions spvOptions;
|
||||||
if (Options & EOptionDebug)
|
if (Options & EOptionDebug)
|
||||||
spvOptions.generateDebugInfo = true;
|
spvOptions.generateDebugInfo = true;
|
||||||
spvOptions.disableOptimizer = Options & EOptionOptimizeDisable;
|
spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0;
|
||||||
spvOptions.optimizeSize = Options & EOptionOptimizeSize;
|
spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0;
|
||||||
glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions);
|
glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions);
|
||||||
|
|
||||||
// Dump the spv to a file or stdout, etc., but only if not doing
|
// Dump the spv to a file or stdout, etc., but only if not doing
|
||||||
|
@ -366,6 +366,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
);
|
);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
#ifdef ENABLE_OPT
|
||||||
// clang-format off
|
// clang-format off
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
ToSpirv, HlslLegalizeTest,
|
ToSpirv, HlslLegalizeTest,
|
||||||
@ -378,6 +379,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
#endif
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
} // namespace glslangtest
|
} // namespace glslangtest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user