diff options
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 875f18980..9825e4e23 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -2032,6 +2032,18 @@ struct OptionsParser } } + // If we don't have any raw outputs but do have a raw target, + // and output type is callable, add an empty' rawOutput. + if (rawOutputs.getCount() == 0 && + rawTargets.getCount() == 1 && + ArtifactDesc::makeFromCompileTarget(asExternal(rawTargets[0].format)).kind == ArtifactKind::Callable) + { + RawOutput rawOutput; + rawOutput.impliedFormat = rawTargets[0].format; + rawOutput.targetIndex = 0; + rawOutputs.add(rawOutput); + } + // Consider the output files specified via `-o` and try to figure // out how to deal with them. // @@ -2083,6 +2095,8 @@ struct OptionsParser case CodeGenTarget::CPPSource: case CodeGenTarget::PTX: case CodeGenTarget::CUDASource: + + case CodeGenTarget::HostHostCallable: case CodeGenTarget::ShaderHostCallable: case CodeGenTarget::HostExecutable: case CodeGenTarget::ShaderSharedLibrary: @@ -2099,6 +2113,7 @@ struct OptionsParser } } + // Now that we've diagnosed the output paths, we can add them // to the compile request at the appropriate locations. // |
