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 --- tests/hlsl/wave-size.slang | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/hlsl/wave-size.slang (limited to 'tests/hlsl') diff --git a/tests/hlsl/wave-size.slang b/tests/hlsl/wave-size.slang new file mode 100644 index 000000000..3fc6363c4 --- /dev/null +++ b/tests/hlsl/wave-size.slang @@ -0,0 +1,13 @@ +//TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry computeMain + +//TEST_INPUT:ubuffer(data=[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer outputBuffer; + +// CHECK: [WaveSize(4)] +[WaveSize(4)] +[numthreads(4, 1, 1)] +void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) +{ + int tid = dispatchThreadID.x; + outputBuffer[tid] = tid; +} -- cgit v1.2.3