diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-options.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 1c1ad8f1c..9830fb18c 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -2945,6 +2945,8 @@ SlangResult OptionsParser::_parse( (m_rawTargets[0].format == CodeGenTarget::HostCPPSource || m_rawTargets[0].format == CodeGenTarget::PyTorchCppBinding || m_rawTargets[0].format == CodeGenTarget::CUDASource || + m_rawTargets[0].format == CodeGenTarget::SPIRV || + m_rawTargets[0].format == CodeGenTarget::SPIRVAssembly || ArtifactDescUtil::makeDescForCompileTarget(asExternal(m_rawTargets[0].format)).kind == ArtifactKind::HostCallable)) { RawOutput rawOutput; @@ -3011,9 +3013,15 @@ SlangResult OptionsParser::_parse( case CodeGenTarget::ShaderSharedLibrary: case CodeGenTarget::PyTorchCppBinding: case CodeGenTarget::DXIL: - rawOutput.isWholeProgram = true; break; + case CodeGenTarget::SPIRV: + case CodeGenTarget::SPIRVAssembly: + if (getCurrentTarget()->targetFlags & SLANG_TARGET_FLAG_GENERATE_SPIRV_DIRECTLY) + { + rawOutput.isWholeProgram = true; + } + break; default: m_sink->diagnose(SourceLoc(), Diagnostics::cannotMatchOutputFileToEntryPoint, rawOutput.path); break; |
