mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 14:13:39 +00:00
Add `out` parameters to expression and type generators. Use the new helper classes in TextGenerator. Cleans up bad formatting. Prepares the writer generating 'pre' statements, required for atomics. If-else statements are generated slightly differently. This is done so that 'pre' statements for the else conditions are scoped correctly. This is identical to the HLSL writer. Bug tint:892 Change-Id: I4c6e96c90673ba30898b3682bf3198497d63a2d4 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56067 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
15 lines
365 B
Plaintext
15 lines
365 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgroup]]) {
|
|
threadgroup int tint_symbol_2;
|
|
if ((local_invocation_index == 0u)) {
|
|
tint_symbol_2 = int();
|
|
}
|
|
threadgroup_barrier(mem_flags::mem_threadgroup);
|
|
tint_symbol_2 = 123;
|
|
int const use = (tint_symbol_2 + 1);
|
|
return;
|
|
}
|
|
|