Make D3D12_Groupshared test deterministic

This commit is contained in:
Jake Turner
2025-09-27 14:16:57 +01:00
parent 1ccdf7f4f4
commit 9952483f2b
+3 -1
View File
@@ -86,8 +86,10 @@ void main(uint3 gid : SV_GroupThreadID)
outval.z = GetGSMValue(gid.x ^ 1);
// do calculation with our neighbour
gsmData[gid.x] = (1.0f + GetGSMValue(gid.x)) * (1.0f + GetGSMValue(gid.x ^ 1));
float value = (1.0f + GetGSMValue(gid.x)) * (1.0f + GetGSMValue(gid.x ^ 1));
GroupMemoryBarrierWithGroupSync();
gsmData[gid.x] = value;
GroupMemoryBarrierWithGroupSync();
// fourth write, our neighbour should be identical to our value