From 9043bc5522cc86560ac5d57ddfc6cfa7612c9222 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 1 May 2024 17:30:55 -0700 Subject: Fix compile failures when using debug symbol. (#4069) * Fix compile failures when using debug symbol. * Various fixes. * Fix intrinsic. * Fix test. --- source/slang/slang-compiler-options.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-compiler-options.cpp') 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); } -- cgit v1.2.3