blob: a55470cd4601a29edb5eae53a46894198d6c3a42 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
bool tint_workgroupUniformLoad(threadgroup bool* const p) {
threadgroup_barrier(mem_flags::mem_threadgroup);
bool const result = *(p);
threadgroup_barrier(mem_flags::mem_threadgroup);
return result;
}
int foo(threadgroup bool* const tint_symbol) {
if (tint_workgroupUniformLoad(tint_symbol)) {
return 42;
}
return 0;
}