summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-04-01 22:02:25 -0700
committerGitHub <noreply@github.com>2024-04-01 22:02:25 -0700
commit251f55c5ec4cb2b7432e71d6ba8adc96700d35c2 (patch)
tree6360ae937545943a97f3a380cbcb3c2d8fb950bd /source/slang/slang-lower-to-ir.cpp
parentdaf63cc983fd5f8f2b24872a9125e0394ed2180e (diff)
Support SM6.6 keyword "WaveSize" (#3871)
Resolves an issue #3385 Shader Model 6.6 added a new keyowrd, "WaveSize". See the following link for more details: https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_WaveSize.html Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 4372d6e7c..1e324b4a4 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -9625,6 +9625,13 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo>
getSimpleVal(context, lowerVal(context, numThreadsAttr->z))
);
}
+ else if (auto waveSizeAttr = as<WaveSizeAttribute>(modifier))
+ {
+ getBuilder()->addWaveSizeDecoration(
+ irFunc,
+ getSimpleVal(context, lowerVal(context, waveSizeAttr->numLanes))
+ );
+ }
else if (as<ReadNoneAttribute>(modifier))
{
getBuilder()->addSimpleDecoration<IRReadNoneDecoration>(irFunc);