diff options
| author | Yong He <yonghe@outlook.com> | 2024-05-01 17:30:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-01 17:30:55 -0700 |
| commit | 9043bc5522cc86560ac5d57ddfc6cfa7612c9222 (patch) | |
| tree | 9804bb8a682386b9f761e8fb164cb43ad5390411 /tools/render-test/slang-support.cpp | |
| parent | 0bb826f8b92aec330875d0b966c1f4a6b99988bf (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 'tools/render-test/slang-support.cpp')
| -rw-r--r-- | tools/render-test/slang-support.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp index dd0394fdf..f76e83937 100644 --- a/tools/render-test/slang-support.cpp +++ b/tools/render-test/slang-support.cpp @@ -120,6 +120,8 @@ void ShaderCompilerUtil::Output::reset() spSetTargetProfile(slangRequest, 0, spFindProfile(out.session, input.profile.getBuffer())); if (options.generateSPIRVDirectly) spSetTargetFlags(slangRequest, 0, SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY); + else + spSetTargetFlags(slangRequest, 0, 0); slangRequest->setAllowGLSLInput(options.allowGLSL); @@ -212,6 +214,14 @@ void ShaderCompilerUtil::Output::reset() spSetLineDirectiveMode(slangRequest, SLANG_LINE_DIRECTIVE_MODE_NONE); } + if (options.generateSPIRVDirectly) + { + if (options.disableDebugInfo) + spSetDebugInfoLevel(slangRequest, SLANG_DEBUG_INFO_LEVEL_NONE); + else + spSetDebugInfoLevel(slangRequest, SLANG_DEBUG_INFO_LEVEL_STANDARD); + } + const SlangResult res = spCompile(slangRequest); if (auto diagnostics = spGetDiagnosticOutput(slangRequest)) |
