From 5be50106aae81d1ebf180765a463abbb842b5d5c Mon Sep 17 00:00:00 2001 From: Alex Sepkowski <5620315+alsepkow@users.noreply.github.com> Date: Fri, 11 Jul 2025 18:58:36 -0700 Subject: [PATCH 1/2] Fix shader source for int64 atomics test --- tools/clang/unittests/HLSLExec/ShaderOpArith.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/clang/unittests/HLSLExec/ShaderOpArith.xml b/tools/clang/unittests/HLSLExec/ShaderOpArith.xml index a782bd97ae..2c471c8a55 100644 --- a/tools/clang/unittests/HLSLExec/ShaderOpArith.xml +++ b/tools/clang/unittests/HLSLExec/ShaderOpArith.xml @@ -1976,7 +1976,7 @@ RWStructuredBuffer g_shareXchg64Buf : register(u5); groupshared uint64_t g_uint64Share[6]; - groupshared int64_t g_sint64Share[3]; + groupshared int64_t g_sint64Share[4]; groupshared uint64_t g_xchg64Share[64]; #define VEC_CALL(op, uav, ix, val) op(uav[ix*stride], val); @@ -2046,7 +2046,7 @@ // Zero-init shared memory, with special cases if (ix < 6) g_uint64Share[ix] = ix == 1 ? 99999999ULL | (99999999ULL << 32) : ix == 3 ? ~0ULL : 0; - if (ix < 3) + if (ix < 4) g_sint64Share[ix] = ix == 1 ? 99999999ULL | (99999999ULL << 32) : 0; if (ix < 64) g_xchg64Share[ix] = 0; From 9f462251204d474c134fd6a63905b01d2e0de10d Mon Sep 17 00:00:00 2001 From: Alex Sepkowski <5620315+alsepkow@users.noreply.github.com> Date: Mon, 21 Jul 2025 15:33:24 -0700 Subject: [PATCH 2/2] Fix similar issue in AtmoicsHeap as well --- tools/clang/unittests/HLSLExec/ShaderOpArith.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/clang/unittests/HLSLExec/ShaderOpArith.xml b/tools/clang/unittests/HLSLExec/ShaderOpArith.xml index 2c471c8a55..dbea8e2aaf 100644 --- a/tools/clang/unittests/HLSLExec/ShaderOpArith.xml +++ b/tools/clang/unittests/HLSLExec/ShaderOpArith.xml @@ -2552,11 +2552,11 @@ void InitSharedMem(uint ix) { // Zero-init shared memory, with special cases - if (ix < 6) + if (ix < 7) g_uintShare[ix] = ix == 1 ? 99999999 : ix == 3 ? -1 : 0; - if (ix < 3) + if (ix < 4) g_sintShare[ix] = ix == 1 ? 99999999 : 0; - if (ix < 64) + if (ix < 65) g_xchgShare[ix] = 0; GroupMemoryBarrierWithGroupSync();