summaryrefslogtreecommitdiffstats
path: root/source/slang/dxc-support.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-06-06 11:59:32 -0700
committerGitHub <noreply@github.com>2018-06-06 11:59:32 -0700
commit7852a2bf0ef5aad0f4f318507c300352c25199f2 (patch)
tree88829279619df3a9234d1010e75169cb3de654f9 /source/slang/dxc-support.cpp
parent1a698128c15bce0c05b0664bb1458842e1e55511 (diff)
Add basic support for Shader Model 6.3 profiles (#594)
* Add basic support for Shader Model 6.3 profiles This adds `vs_6_3` and friends as available profiles, but doesn't add any new builtins specific to Shader Model 6.3. In order to better support the ray tracing shader stages, Slang will not automatically map any attempt to compile a DXR shader up to SM 6.3 (the shader model officially required for these stages) and to the `lib_*` profiles (because there are no stage-specific profiles for these cases). As an added detail, when invoking `dxcompiler.dll` to generate DXIL for DXR shaders, specify an empty entry-point name, since that is expected for `lib_*` profiles. * Fixup: don't drop [shader(...)] attributes The previous change makes the "effective profile" for DXR compiles no longer include a stage, but we had been using the stage stored on the effective profile in exactly one place: when determining what to output for a `[shader("...")]` attribute. This fixup makes it so that we use the stage from the profile on the entry-point layout instead, which seems like the right choice anyway, if we are ever going to emit multiple entry points at once.
Diffstat (limited to 'source/slang/dxc-support.cpp')
-rw-r--r--source/slang/dxc-support.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/dxc-support.cpp b/source/slang/dxc-support.cpp
index 056fefe2d..68b46f1b9 100644
--- a/source/slang/dxc-support.cpp
+++ b/source/slang/dxc-support.cpp
@@ -133,7 +133,7 @@ namespace Slang
IDxcOperationResult* dxcResult = nullptr;
if (FAILED(dxcCompiler->Compile(dxcSourceBlob,
L"slang",
- wideEntryPointName.begin(),
+ profile.GetStage() == Stage::Unknown ? L"" : wideEntryPointName.begin(),
wideProfileName.begin(),
args,
argCount,