From a81380d80095e2d9811854cf8747d4548ff548a7 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 3 Jul 2025 12:25:42 +0100 Subject: [PATCH] Extend D3D12_Shader_Debug_Zoo GSM test Include a large groupshared variable (2D Array) Call GroupMemoryBarrierWithGroupSync() groupshared int gsmInt2DArray[2][1024]; --- util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp b/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp index 6fdccf3db..222106ea0 100644 --- a/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp +++ b/util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp @@ -1116,6 +1116,7 @@ struct TestStruct groupshared int gsmInt; groupshared TestStruct gsmStruct[8]; groupshared int gsmIntArray[128]; +groupshared int gsmInt2DArray[2][1024]; [numthreads(1,1,1)] void main(int3 inTestIndex : SV_GroupID) @@ -1144,14 +1145,18 @@ void main(int3 inTestIndex : SV_GroupID) gsmStruct[gsmInt*4].a = inTestIndex; int idx = 128 - gsmInt - 1; gsmIntArray[idx] = testIndex; + gsmInt2DArray[ZERO][idx] = testIndex; + gsmInt2DArray[ONE][idx] = testIndex; testResult.x = gsmIntArray[idx + ZERO]; testResult.y = testIndex; testResult.z = gsmStruct[gsmInt * 4].a.y; + testResult.w = gsmInt2DArray[ZERO][idx] + gsmInt2DArray[ONE][idx]; } else { testResult.x = inTestIndex.x; } + GroupMemoryBarrierWithGroupSync(); bufOut[gsmInt] = testResult; }