diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-05-15 02:57:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-14 19:57:47 -0700 |
| commit | b4d3d3017640581c21b52a12413d3f074ab1c5c1 (patch) | |
| tree | 2a3fc8350a590e7f342df328b7d9c4469ac40298 /source/slang/slang.cpp | |
| parent | 2275e18fc052239fe67f3fda68252ad92bb83ca9 (diff) | |
Support the new CoopVec builtins (#7108)
**NOTE: This is a breaking change for users who were using POC variant of DXC.
In order to keep the compatibility, the users will have to use -capability hlsl_coopvec_poc to their command line.
This PR adds a new capability "hlsl_coopvec_poc".
When it is used, the HLSL for CoopVec will be emitted for the POC variant of DXC.
When it is not used, the HLSL for CoopVec will be emitted for the DXC that officially supports the cooperative vector.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 67d13c34b..c7f6c920c 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -2347,7 +2347,16 @@ CapabilitySet TargetRequest::getTargetCaps() for (auto atomVal : optionSet.getArray(CompilerOptionName::Capability)) { - auto toAdd = CapabilitySet((CapabilityName)atomVal.intValue); + CapabilitySet toAdd; + switch (atomVal.kind) + { + case CompilerOptionValueKind::Int: + toAdd = CapabilitySet(CapabilityName(atomVal.intValue)); + break; + case CompilerOptionValueKind::String: + toAdd = CapabilitySet(findCapabilityName(atomVal.stringValue.getUnownedSlice())); + break; + } if (isGLSLTarget) targetCap.addSpirvVersionFromOtherAsGlslSpirvVersion(toAdd); |
