tests/hlsl: Add wave op tests.

This commit is contained in:
Conor McCarthy
2024-04-16 14:30:12 +10:00
committed by Alexandre Julliard
parent 6cf065e7fd
commit d5c6e12dd3
Notes: Alexandre Julliard 2024-04-22 23:37:56 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/795
4 changed files with 820 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
[require]
shader model >= 6.0
[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, 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]
todo 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<int4> u0;
RWBuffer<int4> u1;
[numthreads(4, 1, 1)]
void main(uint id : SV_GroupIndex)
{
u1[id] = WaveActiveMax(u0[id]);
}
[test]
todo dispatch 4 1 1
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)