dawn-cmake/test/tint/shader_io/compute_input_builtins.wgsl...

13 lines
779 B
Plaintext

#include <metal_stdlib>
using namespace metal;
void tint_symbol_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id, uint3 num_workgroups) {
uint const foo = ((((local_invocation_id[0] + local_invocation_index) + global_invocation_id[0]) + workgroup_id[0]) + num_workgroups[0]);
}
kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]], uint3 num_workgroups [[threadgroups_per_grid]]) {
tint_symbol_inner(local_invocation_id, local_invocation_index, global_invocation_id, workgroup_id, num_workgroups);
return;
}