mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
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>
17 lines
485 B
Plaintext
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;
|
|
}
|
|
|