From 3f1c97c518c45c949a083316eb5c802b898c2872 Mon Sep 17 00:00:00 2001 From: Jack Elliott Date: Wed, 8 Apr 2026 12:21:18 +1200 Subject: [PATCH] Fix GroupSharedLimitASTest and GroupSharedLimitMSTest execution tests - Change Init="Zero" to Init="ByName" on UAVBuffer0 resources in ShaderOpArith.xml so the C++ callback fires to set shader text and resize the buffer. - Update NumElements from 128 to 4096 on UAV descriptors to match the 4096 DWORDs the shaders write. - Add dummy SV_Position write in mesh shaders to satisfy DXIL validation requirement that all output semantics have stores. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tools/clang/unittests/HLSLExec/ExecutionTest.cpp | 2 ++ tools/clang/unittests/HLSLExec/ShaderOpArith.xml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/clang/unittests/HLSLExec/ExecutionTest.cpp b/tools/clang/unittests/HLSLExec/ExecutionTest.cpp index 8c8dc8d036..65d4dde80b 100644 --- a/tools/clang/unittests/HLSLExec/ExecutionTest.cpp +++ b/tools/clang/unittests/HLSLExec/ExecutionTest.cpp @@ -10855,6 +10855,7 @@ void ExecutionTest::GroupSharedLimitASTest() { out vertices MeshOutput verts[3], out indices uint3 tris[1]) { SetMeshOutputCounts(0, 0); + verts[0].pos = float4(0, 0, 0, 0); } float4 PSMain() : SV_Target { return float4(0,0,0,0); } @@ -10914,6 +10915,7 @@ void ExecutionTest::GroupSharedLimitMSTest() { out vertices MeshOutput verts[3], out indices uint3 tris[1]) { SetMeshOutputCounts(0, 0); + verts[0].pos = float4(0, 0, 0, 0); for (uint i = GI; i < GSM_DWORDS; i += 64) g_shared[i] = i; GroupMemoryBarrierWithGroupSync(); diff --git a/tools/clang/unittests/HLSLExec/ShaderOpArith.xml b/tools/clang/unittests/HLSLExec/ShaderOpArith.xml index 058853725d..07bac976b9 100644 --- a/tools/clang/unittests/HLSLExec/ShaderOpArith.xml +++ b/tools/clang/unittests/HLSLExec/ShaderOpArith.xml @@ -1869,13 +1869,13 @@ RootFlags(0), DescriptorTable(UAV(u0)) - + - + @@ -1895,13 +1895,13 @@ RootFlags(0), DescriptorTable(UAV(u0)) - + - +