dawn-cmake/test/tint/var/initialization/workgroup/matrix.wgsl.expected.msl
Ben Clayton cb6ddd2aa6 tint/writer/msl: Inline constant expressions
This is required to handle materialized values, and for constant
expressions.

Bug: tint:1504
Change-Id: Ic3ac62317241fa6f7009360128f222aeb56f62e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-06-01 10:08:29 +00:00

21 lines
601 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_symbol_4 {
float2x3 v;
};
void tint_symbol_inner(uint local_invocation_index, threadgroup float2x3* const tint_symbol_1) {
{
*(tint_symbol_1) = float2x3(float3(0.0f), float3(0.0f));
}
threadgroup_barrier(mem_flags::mem_threadgroup);
}
kernel void tint_symbol(threadgroup tint_symbol_4* tint_symbol_3 [[threadgroup(0)]], uint local_invocation_index [[thread_index_in_threadgroup]]) {
threadgroup float2x3* const tint_symbol_2 = &((*(tint_symbol_3)).v);
tint_symbol_inner(local_invocation_index, tint_symbol_2);
return;
}