summaryrefslogtreecommitdiff
path: root/source/slang/slang-compiler-options.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-05-01 17:30:55 -0700
committerGitHub <noreply@github.com>2024-05-01 17:30:55 -0700
commit9043bc5522cc86560ac5d57ddfc6cfa7612c9222 (patch)
tree9804bb8a682386b9f761e8fb164cb43ad5390411 /source/slang/slang-compiler-options.cpp
parent0bb826f8b92aec330875d0b966c1f4a6b99988bf (diff)
Fix compile failures when using debug symbol. (#4069)
* Fix compile failures when using debug symbol. * Various fixes. * Fix intrinsic. * Fix test.
Diffstat (limited to 'source/slang/slang-compiler-options.cpp')
-rw-r--r--source/slang/slang-compiler-options.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/slang/slang-compiler-options.cpp b/source/slang/slang-compiler-options.cpp
index 974fbaaaa..ea2593713 100644
--- a/source/slang/slang-compiler-options.cpp
+++ b/source/slang/slang-compiler-options.cpp
@@ -186,7 +186,7 @@ namespace Slang
result |= SLANG_TARGET_FLAG_DUMP_IR;
if (getBoolOption(CompilerOptionName::GenerateWholeProgram))
result |= SLANG_TARGET_FLAG_GENERATE_WHOLE_PROGRAM;
- if (getBoolOption(CompilerOptionName::EmitSpirvDirectly))
+ if (!getBoolOption(CompilerOptionName::EmitSpirvViaGLSL))
result |= SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY;
if (getBoolOption(CompilerOptionName::ParameterBlocksUseRegisterSpaces))
result |= SLANG_TARGET_FLAG_PARAMETER_BLOCKS_USE_REGISTER_SPACES;
@@ -197,7 +197,10 @@ namespace Slang
{
set(CompilerOptionName::DumpIr, (flags & SLANG_TARGET_FLAG_DUMP_IR) != 0);
set(CompilerOptionName::GenerateWholeProgram, (flags & SLANG_TARGET_FLAG_GENERATE_WHOLE_PROGRAM) != 0);
- set(CompilerOptionName::EmitSpirvDirectly, (flags & SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY) != 0);
+ if ((flags & SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY) != 0)
+ set(CompilerOptionName::EmitSpirvViaGLSL, false);
+ else
+ set(CompilerOptionName::EmitSpirvViaGLSL, true);
set(CompilerOptionName::ParameterBlocksUseRegisterSpaces, (flags & SLANG_TARGET_FLAG_PARAMETER_BLOCKS_USE_REGISTER_SPACES) != 0);
}