summaryrefslogtreecommitdiff
path: root/tests/metal/groupshared-threadlocal-same-parameter.slang
diff options
context:
space:
mode:
authorArielG-NV <159081215+ArielG-NV@users.noreply.github.com>2024-08-14 13:05:57 -0400
committerGitHub <noreply@github.com>2024-08-14 10:05:57 -0700
commit45b76418f9da2248b069f2058c6a1d52b05a8c74 (patch)
tree1757276c7a2fe295d2b130cd74a42c9b8db8783b /tests/metal/groupshared-threadlocal-same-parameter.slang
parentd8f63e70719c96044b8f497f7dddb264a7edd560 (diff)
Do not zero-initialize groupshared and rayquery variables (#4838)
* Do not zero-initialize groupshared and rayquery variables Fixes: #4824 `-zero-initialize` option will explicitly not: 1. Set any groupshared values to defaults 2. Set any rayQuery object to a default state (currently invalid code generation) * grammer * disallow groupshared initializers disallow groupshared initializers & adjust tests accordingly * remove disallowed groupshared-init expression * do not default init if non-copyable --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/metal/groupshared-threadlocal-same-parameter.slang')
-rw-r--r--tests/metal/groupshared-threadlocal-same-parameter.slang3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/metal/groupshared-threadlocal-same-parameter.slang b/tests/metal/groupshared-threadlocal-same-parameter.slang
index ae4cac8df..1249d4703 100644
--- a/tests/metal/groupshared-threadlocal-same-parameter.slang
+++ b/tests/metal/groupshared-threadlocal-same-parameter.slang
@@ -6,7 +6,7 @@
//TEST_INPUT:ubuffer(data=[0 0], stride=4):out,name outputBuffer
RWStructuredBuffer<uint> outputBuffer;
-static groupshared uint g_values[2] = { 1, 0 };
+static groupshared uint g_values[2];
static uint g_altValues[2] = { 2, 3 };
static groupshared uint g_valuesReturned[2];
@@ -27,6 +27,7 @@ uint[2] maybeGroupSharedReturn(uint id)
[numthreads(2, 1, 1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
+ g_values = { 1, 0 };
AllMemoryBarrierWithGroupSync();
uint tid = dispatchThreadID.x;
if (tid == 0)