From 251f55c5ec4cb2b7432e71d6ba8adc96700d35c2 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:02:25 -0700 Subject: 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 --- source/slang/slang-ir.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-ir.cpp') diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index 95f2a7c75..85464446d 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -5105,6 +5105,15 @@ namespace Slang return addDecoration(inst, kIROp_NumThreadsDecoration, operands, 3); } + IRInst* IRBuilder::addWaveSizeDecoration(IRInst* inst, IRInst* numLanes) + { + IRInst* operands[1] = { + numLanes + }; + + return addDecoration(inst, kIROp_WaveSizeDecoration, operands, 1); + } + IRInst* IRBuilder::emitSwizzle( IRType* type, IRInst* base, -- cgit v1.2.3