wgpu/naga/tests/out/hlsl/workgroup-uniform-load.hlsl
Jim Blandy 92287c30b5 [naga hlsl-out] Use Baked for baked expressions.
Make the HLSL backend more like other backends by using `back::Baked`
to generate names for baked expression identifiers. This removes the
final uses of `Handle::index` from the HLSL backend.

This is separated out from the previous commit because it changes lots
of snapshot tests, whereas the previous commit has no effect on Naga's
output.
2024-06-21 09:56:40 +02:00

22 lines
572 B
HLSL

static const uint SIZE = 128u;
groupshared int arr_i32_[128];
[numthreads(4, 1, 1)]
void test_workgroupUniformLoad(uint3 workgroup_id : SV_GroupID, uint3 __local_invocation_id : SV_GroupThreadID)
{
if (all(__local_invocation_id == uint3(0u, 0u, 0u))) {
arr_i32_ = (int[128])0;
}
GroupMemoryBarrierWithGroupSync();
GroupMemoryBarrierWithGroupSync();
int _e4 = arr_i32_[workgroup_id.x];
GroupMemoryBarrierWithGroupSync();
if ((_e4 > 10)) {
GroupMemoryBarrierWithGroupSync();
return;
} else {
return;
}
}