summaryrefslogtreecommitdiffstats
path: root/tools/render-test/slang-support.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/render-test/slang-support.cpp')
-rw-r--r--tools/render-test/slang-support.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp
index 2f39ed078..f98372330 100644
--- a/tools/render-test/slang-support.cpp
+++ b/tools/render-test/slang-support.cpp
@@ -194,6 +194,22 @@ static SlangResult _compileProgramImpl(
else
sessionTargetDesc.flags = 0;
+ {
+ slang::CompilerOptionEntry entry;
+ entry.value.kind = slang::CompilerOptionValueKind::Int;
+ if (options.generateSPIRVDirectly)
+ {
+ entry.name = slang::CompilerOptionName::EmitSpirvDirectly;
+ entry.value.intValue0 = int(options.generateSPIRVDirectly);
+ }
+ else
+ {
+ entry.name = slang::CompilerOptionName::EmitSpirvViaGLSL;
+ entry.value.intValue0 = int(!options.generateSPIRVDirectly);
+ }
+ sessionOptionEntries.add(entry);
+ }
+
// Not expecting argument parsing to have added any targets
SLANG_ASSERT(sessionDesc.targetCount == 0);
sessionDesc.targetCount = 1;