wgpu/naga/tests/out/msl/workgroup-uniform-load.msl
2023-10-25 14:25:04 -04:00

33 lines
900 B
Plaintext

// language: metal1.0
#include <metal_stdlib>
#include <simd/simd.h>
using metal::uint;
struct type_2 {
int inner[128];
};
constant uint SIZE = 128u;
struct test_workgroupUniformLoadInput {
};
kernel void test_workgroupUniformLoad(
metal::uint3 workgroup_id [[threadgroup_position_in_grid]]
, metal::uint3 __local_invocation_id [[thread_position_in_threadgroup]]
, threadgroup type_2& arr_i32_
) {
if (metal::all(__local_invocation_id == metal::uint3(0u))) {
arr_i32_ = {};
}
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
int unnamed = arr_i32_.inner[workgroup_id.x];
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
if (unnamed > 10) {
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
return;
} else {
return;
}
}