From dbe2d9dd2ec322aa4394bd4828b09a7f62e02fda Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 8 May 2025 10:21:27 +0100 Subject: [PATCH] Fix D3D12_Shader_Debug_Zoo CS failing test --- util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp b/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp index 467327967..6fdccf3db 100644 --- a/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp +++ b/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp @@ -1125,6 +1125,9 @@ void main(int3 inTestIndex : SV_GroupID) return; int testIndex = inTestIndex.x; + int ZERO = floor(testIndex/(testIndex+1.0e-6f)); + int ONE = ZERO + 1; + int4 testResult = 123; gsmInt = testIndex; gsmStruct[gsmInt].a = inTestIndex; @@ -1141,7 +1144,7 @@ void main(int3 inTestIndex : SV_GroupID) gsmStruct[gsmInt*4].a = inTestIndex; int idx = 128 - gsmInt - 1; gsmIntArray[idx] = testIndex; - testResult.x = gsmIntArray[idx/2]; + testResult.x = gsmIntArray[idx + ZERO]; testResult.y = testIndex; testResult.z = gsmStruct[gsmInt * 4].a.y; }