dawn-cmake/test/var/initialization/workgroup/matrix.wgsl.expected.msl
James Price acaecab29d msl: Handle workgroup matrix allocations
Use a threadgroup memory argument for any workgroup variable that
contains a matrix.

The generator now provides a list of threadgroup memory arguments for
each entry point, so that the runtime knows how many bytes to allocate
for each argument.

Bug: tint:938
Change-Id: Ia4af33cd6a44c4f74258793443eb737c2931f5eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/64042
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2021-09-13 19:56:01 +00:00

17 lines
485 B
Plaintext

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