mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
tests/hlsl: Add a TGSM 16-bit test.
This commit is contained in:
committed by
Henri Verbeet
parent
94b8747da4
commit
2b325d3b59
Notes:
Henri Verbeet
2025-02-19 18:02:57 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1375
@ -161,3 +161,36 @@ void main(uint local_idx : SV_GroupIndex)
|
||||
[test]
|
||||
todo(sm<6) dispatch 1 1 1
|
||||
probe uav 1 (0) rui (39)
|
||||
|
||||
[require]
|
||||
shader model >= 6.2
|
||||
native-16-bit
|
||||
|
||||
[uav 1]
|
||||
format r32-typeless
|
||||
size (raw_buffer, 4)
|
||||
|
||||
0xf000f 0xf000f 0xf000f 0xf000f
|
||||
|
||||
[compute shader]
|
||||
RWByteAddressBuffer u : register(u1);
|
||||
groupshared uint16_t m[4];
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
void main(uint local_idx : SV_GroupIndex, uint group_id : SV_GroupID)
|
||||
{
|
||||
uint16_t id = (uint16_t)group_id.x;
|
||||
/* 16-bit atomic ops are not supported. */
|
||||
m[local_idx] = id + 8 * (local_idx + 1);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
m[local_idx] += m[local_idx ^ 1];
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
u.Store(8 * group_id.x + 2 * local_idx, m[local_idx]);
|
||||
}
|
||||
|
||||
[test]
|
||||
dispatch 2 1 1
|
||||
probe uav 1 (0) rui(0x180018)
|
||||
probe uav 1 (1) rui(0x380038)
|
||||
probe uav 1 (2) rui(0x1a001a)
|
||||
probe uav 1 (3) rui(0x3a003a)
|
||||
|
Reference in New Issue
Block a user