mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests/hlsl: Test some quirks of TGSMs with SM < 5.0.
I'm not specifically interested in that, but since I ran into those idiosyncrasies while writing other TGSM tests I decided that it might turn out useful to keep them.
This commit is contained in:
committed by
Henri Verbeet
parent
bda2be3423
commit
1d77d51ca4
Notes:
Henri Verbeet
2025-06-05 16:18:20 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1533
@@ -1,3 +1,78 @@
|
||||
[require]
|
||||
% SM < 5.0 requires that groupshared variables are arrays of N elements,
|
||||
% where N is the number of threads in a group, and they are only ever indexed
|
||||
% by SV_GroupIndex when storing (though violating this last condition gives
|
||||
% E_NOTIMPL rather than E_FAIL).
|
||||
shader model >= 4.0
|
||||
shader model < 5.0
|
||||
|
||||
[compute shader fail todo]
|
||||
RWByteAddressBuffer u : register(u0);
|
||||
groupshared uint m;
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint local_idx : SV_GroupIndex)
|
||||
{
|
||||
if (local_idx == 0)
|
||||
m = 0;
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
u.Store(4 * local_idx, m);
|
||||
}
|
||||
|
||||
[compute shader fail todo]
|
||||
RWByteAddressBuffer u : register(u0);
|
||||
groupshared uint m[1];
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint local_idx : SV_GroupIndex)
|
||||
{
|
||||
if (local_idx == 0)
|
||||
m[0] = 0;
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
u.Store(4 * local_idx, m[0]);
|
||||
}
|
||||
|
||||
[compute shader notimpl]
|
||||
RWByteAddressBuffer u : register(u0);
|
||||
groupshared uint m[4];
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint local_idx : SV_GroupIndex)
|
||||
{
|
||||
if (local_idx == 0)
|
||||
m[0] = 0;
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
u.Store(4 * local_idx, m[0]);
|
||||
}
|
||||
|
||||
[require]
|
||||
shader model >= 4.0
|
||||
|
||||
[uav 0]
|
||||
format r32-typeless
|
||||
size (raw_buffer, 4)
|
||||
|
||||
0 0 0 0
|
||||
|
||||
[compute shader todo]
|
||||
RWByteAddressBuffer u : register(u0);
|
||||
groupshared uint m[4];
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint local_idx : SV_GroupIndex)
|
||||
{
|
||||
m[local_idx] = 0xcafef00d;
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
u.Store(4 * local_idx, m[0]);
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm<6) dispatch 1 1 1
|
||||
probe uav 0 (0) rui(0xcafef00d)
|
||||
probe uav 0 (1) rui(0xcafef00d)
|
||||
probe uav 0 (2) rui(0xcafef00d)
|
||||
probe uav 0 (3) rui(0xcafef00d)
|
||||
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
|
||||
|
Reference in New Issue
Block a user