2024-04-15 21:30:12 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 6.0
|
2024-04-23 18:29:17 -07:00
|
|
|
wave ops
|
2024-08-01 16:13:31 -07:00
|
|
|
format r32g32b32a32-sint uav-load
|
2024-04-15 21:30:12 -07:00
|
|
|
|
|
|
|
[uav 0]
|
2024-08-01 18:03:46 -07:00
|
|
|
format r32g32b32a32-sint
|
2024-04-15 21:30:12 -07:00
|
|
|
size (buffer, 4)
|
|
|
|
|
|
|
|
-3 1 -4 2
|
|
|
|
3 1 -4 2
|
|
|
|
0 5 -3 2
|
|
|
|
-1 1 -1 2
|
|
|
|
|
|
|
|
[uav 1]
|
2024-08-01 18:03:46 -07:00
|
|
|
format r32g32b32a32-sint
|
2024-04-15 21:30:12 -07:00
|
|
|
size (buffer, 4)
|
|
|
|
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
0 0 0 0
|
|
|
|
|
|
|
|
[compute shader]
|
|
|
|
RWBuffer<int4> u0;
|
|
|
|
RWBuffer<int4> u1;
|
|
|
|
|
|
|
|
[numthreads(4, 1, 1)]
|
|
|
|
void main(uint id : SV_GroupIndex)
|
|
|
|
{
|
|
|
|
u1[id] = WaveActiveMin(u0[id]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-04-23 04:35:27 -07:00
|
|
|
dispatch 4 1 1
|
2024-04-15 21:30:12 -07:00
|
|
|
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<int4> u0;
|
|
|
|
RWBuffer<int4> u1;
|
|
|
|
|
|
|
|
[numthreads(4, 1, 1)]
|
|
|
|
void main(uint id : SV_GroupIndex)
|
|
|
|
{
|
|
|
|
u1[id] = WaveActiveMax(u0[id]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-04-23 04:35:27 -07:00
|
|
|
dispatch 4 1 1
|
2024-04-15 21:30:12 -07:00
|
|
|
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)
|