From f3fac95bb62c45ebb3fdeb61f15b478306af0958 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Tue, 3 Dec 2024 12:14:04 +1000 Subject: [PATCH] tests/hlsl: Add int64 wave op tests. --- tests/hlsl/wave-ops-int.shader_test | 64 +++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/tests/hlsl/wave-ops-int.shader_test b/tests/hlsl/wave-ops-int.shader_test index e6bf267f..50f7d43e 100644 --- a/tests/hlsl/wave-ops-int.shader_test +++ b/tests/hlsl/wave-ops-int.shader_test @@ -55,3 +55,67 @@ probe uav 1 (0) rgbai (3, 5, -1, 2) probe uav 1 (1) rgbai (3, 5, -1, 2) probe uav 1 (2) rgbai (3, 5, -1, 2) probe uav 1 (3) rgbai (3, 5, -1, 2) + + +[require] +shader model >= 6.0 +wave-ops +int64 +format r32g32b32a32-sint uav-load + +[uav 0] +format r32g32b32a32-sint +size (buffer, 4) + +-3 -1 -4 2 + 3 1 -4 2 + 0 5 -3 2 +-1 -1 -1 2 + +[uav 1] +format r32g32b32a32-sint +size (buffer, 16) + +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 + +[compute shader] +RWBuffer u0; +RWBuffer u1; + + [numthreads(4, 1, 1)] +void main(uint id : SV_GroupIndex) +{ + u1[id] = WaveActiveMin(u0[id]); +} + +[test] +dispatch 4 1 1 +probe uav 1 (0) rgbai(-3, -1, -4, 2) +probe uav 1 (1) rgbai(-3, -1, -4, 2) +probe uav 1 (2) rgbai(-3, -1, -4, 2) +probe uav 1 (3) rgbai(-3, -1, -4, 2) + + +[compute shader] +RWBuffer u0; +RWBuffer u1; + + [numthreads(4, 1, 1)] +void main(uint id : SV_GroupIndex) +{ + u1[id] = WaveActiveMax(u0[id]); +} + +[test] +dispatch 4 1 1 +probe uav 1 (0) rgbai(0, 5, -1, 2) +probe uav 1 (1) rgbai(0, 5, -1, 2) +probe uav 1 (2) rgbai(0, 5, -1, 2) +probe uav 1 (3) rgbai(0, 5, -1, 2)