tests/hlsl: Add a test for WaveReadLaneAt() with a non-uniform index.

This commit is contained in:
Conor McCarthy 2024-05-09 12:22:03 +10:00 committed by Alexandre Julliard
parent c9af34ab28
commit 5790056c44
Notes: Alexandre Julliard 2024-05-14 23:00:18 +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/863

View File

@ -165,6 +165,26 @@ probe uav 1 (2) rui (18)
probe uav 1 (3) rui (18)
[compute shader]
RWBuffer<uint> u0;
RWBuffer<uint> u1;
[numthreads(4, 1, 1)]
void main(uint id : SV_GroupIndex)
{
uint i = u0[id] + u0[id ^ 1];
// Non-uniform lane index
u1[id] = WaveReadLaneAt(i, (id + 2) & 3);
}
[test]
todo dispatch 4 1 1
probe uav 1 (0) rui (18)
probe uav 1 (1) rui (18)
probe uav 1 (2) rui (23)
probe uav 1 (3) rui (23)
[compute shader]
RWBuffer<uint> u0;
RWBuffer<uint> u1;