mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/hlsl: Add uint64 wave op tests.
This commit is contained in:
committed by
Henri Verbeet
parent
f0f8bb3f36
commit
50306a8b08
Notes:
Henri Verbeet
2024-12-09 16:17:26 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/820
@@ -324,3 +324,306 @@ probe uav 1 (0) rui (29)
|
||||
probe uav 1 (1) rui (29)
|
||||
probe uav 1 (2) rui (29)
|
||||
probe uav 1 (3) rui (29)
|
||||
|
||||
|
||||
[require]
|
||||
shader model >= 6.0
|
||||
wave-ops
|
||||
int64
|
||||
format r32g32b32a32-uint uav-load
|
||||
|
||||
[uav 0]
|
||||
format r32g32b32a32-uint
|
||||
size (buffer, 4)
|
||||
|
||||
1 8 16 0
|
||||
1 11 5 0
|
||||
2 15 4 0
|
||||
4 8 6 0
|
||||
|
||||
[uav 1]
|
||||
format r32g32b32a32-uint
|
||||
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<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
uint64_t2 u = u0[id] + u0[id ^ 1];
|
||||
u1[id] = WaveReadLaneFirst(u);
|
||||
u1[4 + id] = WaveReadLaneAt(u, 3);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0x1300000002, 21)
|
||||
probe uav 1 (1) rgui64(0x1300000002, 21)
|
||||
probe uav 1 (2) rgui64(0x1300000002, 21)
|
||||
probe uav 1 (3) rgui64(0x1300000002, 21)
|
||||
probe uav 1 (4) rgui64(0x1700000006, 10)
|
||||
probe uav 1 (5) rgui64(0x1700000006, 10)
|
||||
probe uav 1 (6) rgui64(0x1700000006, 10)
|
||||
probe uav 1 (7) rgui64(0x1700000006, 10)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WaveActiveSum(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0x2a00000008, 31)
|
||||
probe uav 1 (1) rgui64(0x2a00000008, 31)
|
||||
probe uav 1 (2) rgui64(0x2a00000008, 31)
|
||||
probe uav 1 (3) rgui64(0x2a00000008, 31)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WaveActiveProduct(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0xe400000008, 0x780)
|
||||
probe uav 1 (1) rgui64(0xe400000008, 0x780)
|
||||
probe uav 1 (2) rgui64(0xe400000008, 0x780)
|
||||
probe uav 1 (3) rgui64(0xe400000008, 0x780)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> 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) rgui64(0x800000001, 4)
|
||||
probe uav 1 (1) rgui64(0x800000001, 4)
|
||||
probe uav 1 (2) rgui64(0x800000001, 4)
|
||||
probe uav 1 (3) rgui64(0x800000001, 4)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> 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) rgui64(0xf00000002, 16)
|
||||
probe uav 1 (1) rgui64(0xf00000002, 16)
|
||||
probe uav 1 (2) rgui64(0xf00000002, 16)
|
||||
probe uav 1 (3) rgui64(0xf00000002, 16)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WavePrefixSum(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0, 0)
|
||||
probe uav 1 (1) rgui64( 0x800000001, 16)
|
||||
probe uav 1 (2) rgui64(0x1300000002, 21)
|
||||
probe uav 1 (3) rgui64(0x2200000004, 25)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WavePrefixProduct(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(1, 1)
|
||||
probe uav 1 (1) rgui64( 0x800000001, 16)
|
||||
probe uav 1 (2) rgui64(0x1300000001, 80)
|
||||
probe uav 1 (3) rgui64(0x3500000002, 320)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WaveActiveBitAnd(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0x800000000, 0)
|
||||
probe uav 1 (1) rgui64(0x800000000, 0)
|
||||
probe uav 1 (2) rgui64(0x800000000, 0)
|
||||
probe uav 1 (3) rgui64(0x800000000, 0)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WaveActiveBitOr(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0xf00000007, 0x17)
|
||||
probe uav 1 (1) rgui64(0xf00000007, 0x17)
|
||||
probe uav 1 (2) rgui64(0xf00000007, 0x17)
|
||||
probe uav 1 (3) rgui64(0xf00000007, 0x17)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
u1[id] = WaveActiveBitXor(u0[id]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0x400000006, 0x17)
|
||||
probe uav 1 (1) rgui64(0x400000006, 0x17)
|
||||
probe uav 1 (2) rgui64(0x400000006, 0x17)
|
||||
probe uav 1 (3) rgui64(0x400000006, 0x17)
|
||||
|
||||
|
||||
[uav 0]
|
||||
format r32g32b32a32-uint
|
||||
size (buffer, 4)
|
||||
|
||||
1 2 3 4
|
||||
5 6 7 8
|
||||
9 10 11 12
|
||||
13 14 15 16
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
uint i = WaveGetLaneIndex() % 4;
|
||||
uint64_t2 u = u0[i];
|
||||
u1[i] = QuadReadAcrossX(u);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0x600000005, 0x800000007)
|
||||
probe uav 1 (1) rgui64(0x200000001, 0x400000003)
|
||||
probe uav 1 (2) rgui64(0xe0000000d, 0x100000000f)
|
||||
probe uav 1 (3) rgui64(0xa00000009, 0xc0000000b)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
uint i = WaveGetLaneIndex() % 4;
|
||||
uint64_t2 u = u0[i];
|
||||
u1[i] = QuadReadAcrossY(u);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0xa00000009, 0xc0000000b)
|
||||
probe uav 1 (1) rgui64(0xe0000000d, 0x100000000f)
|
||||
probe uav 1 (2) rgui64(0x200000001, 0x400000003)
|
||||
probe uav 1 (3) rgui64(0x600000005, 0x800000007)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
uint i = WaveGetLaneIndex() % 4;
|
||||
uint64_t2 u = u0[i];
|
||||
u1[i] = QuadReadAcrossDiagonal(u);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0xe0000000d, 0x100000000f)
|
||||
probe uav 1 (1) rgui64(0xa00000009, 0xc0000000b)
|
||||
probe uav 1 (2) rgui64(0x600000005, 0x800000007)
|
||||
probe uav 1 (3) rgui64(0x200000001, 0x400000003)
|
||||
|
||||
|
||||
[compute shader]
|
||||
RWBuffer<uint64_t2> u0;
|
||||
RWBuffer<uint64_t2> u1;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint id : SV_GroupIndex)
|
||||
{
|
||||
uint i = WaveGetLaneIndex() % 4;
|
||||
uint64_t2 u = u0[i];
|
||||
u1[i] = QuadReadLaneAt(u, 2);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rgui64(0xa00000009, 0xc0000000b)
|
||||
probe uav 1 (1) rgui64(0xa00000009, 0xc0000000b)
|
||||
probe uav 1 (2) rgui64(0xa00000009, 0xc0000000b)
|
||||
probe uav 1 (3) rgui64(0xa00000009, 0xc0000000b)
|
||||
|
Reference in New Issue
Block a user