Ensure no false positives in tests if some values are 0.0

This commit is contained in:
baldurk
2025-02-21 11:34:14 +00:00
parent 0cc8cded0c
commit 8f0e9a2c48
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ void main(uint3 tid : SV_GroupThreadID)
outval.z = tmp[tid.x ^ 1];
// do calculation with our neighbour
tmp[tid.x] = tmp[tid.x] * tmp[tid.x ^ 1];
tmp[tid.x] = (1.0f + tmp[tid.x]) * (1.0f + tmp[tid.x ^ 1]);
GroupMemoryBarrierWithGroupSync();
+1 -1
View File
@@ -61,7 +61,7 @@ void main(uint3 tid : SV_GroupThreadID)
outval.z = tmp[tid.x ^ 1];
// do calculation with our neighbour
tmp[tid.x] = tmp[tid.x] * tmp[tid.x ^ 1];
tmp[tid.x] = (1.0f + tmp[tid.x]) * (1.0f + tmp[tid.x ^ 1]);
GroupMemoryBarrierWithGroupSync();
+2 -2
View File
@@ -45,7 +45,7 @@ shared float tmp[64];
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
define GroupMemoryBarrierWithGroupSync() memoryBarrierShared();groupMemoryBarrier();barrier();
#define GroupMemoryBarrierWithGroupSync() memoryBarrierShared();groupMemoryBarrier();barrier();
void main()
{
@@ -74,7 +74,7 @@ void main()
outval.z = tmp[tid.x ^ 1];
// do calculation with our neighbour
tmp[tid.x] = tmp[tid.x] * tmp[tid.x ^ 1];
tmp[tid.x] = (1.0f + tmp[tid.x]) * (1.0f + tmp[tid.x ^ 1]);
GroupMemoryBarrierWithGroupSync();