mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
The `Ignore()` intrinsic is about to be deprecated, so don't use it for testing. Bug: tint:1213 Change-Id: I314ecaeb9a9c337c7b6980189054120a74807ebd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/67066 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com> Reviewed-by: James Price <jrprice@google.com>
22 lines
606 B
Plaintext
22 lines
606 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_array_wrapper {
|
|
int arr[3];
|
|
};
|
|
|
|
void tint_symbol_inner(uint local_invocation_index, threadgroup tint_array_wrapper* const tint_symbol_1) {
|
|
for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) {
|
|
uint const i = idx;
|
|
(*(tint_symbol_1)).arr[i] = int();
|
|
}
|
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
|
}
|
|
|
|
kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
|
threadgroup tint_array_wrapper tint_symbol_2;
|
|
tint_symbol_inner(local_invocation_index, &(tint_symbol_2));
|
|
return;
|
|
}
|
|
|