From ed5940a629ae05e9571bfe355d22f0728347dcb4 Mon Sep 17 00:00:00 2001 From: Darren Wihandi <65404740+fairywreath@users.noreply.github.com> Date: Tue, 22 Apr 2025 14:04:56 -0600 Subject: Implement shader subgroup rotate intrinsics (#6878) * Initial implementation for SPIRV, GLSL and Metal * test add bool test * Fix and improve subgroup rotate tests * Add proper GLSL extensions and proper Metal type checking * Clean up tests and add diagnostics test for subgroup type for Metal * Update wave-intrinsics docs --- tests/diagnostics/wave-operations-types.slang | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/diagnostics/wave-operations-types.slang (limited to 'tests/diagnostics') diff --git a/tests/diagnostics/wave-operations-types.slang b/tests/diagnostics/wave-operations-types.slang new file mode 100644 index 000000000..55a6a8e91 --- /dev/null +++ b/tests/diagnostics/wave-operations-types.slang @@ -0,0 +1,14 @@ +//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -entry computeMain -stage compute -target metal + +RWStructuredBuffer out; + +[shader("compute")] +void computeMain(uint3 dispatchID : SV_DispatchThreadID) +{ + // CHECK: Unsupported type for subgroup operations in Metal. Valid types include + // CHECK: Unsupported type for subgroup operations in Metal. Valid types include + // CHECK: Unsupported type for subgroup operations in Metal. Valid types include + out[0] = WaveRotate(true, 1); + out[1] = WaveRotate(uint8_t(dispatchID.x), 1); + out[2] = WaveRotate(uint64_t(dispatchID.x), 1); +} -- cgit v1.2.3