dawn-cmake/test/shader_io/compute_input_builtins_stru...

17 lines
754 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct ComputeInputs {
uint3 local_invocation_id;
uint local_invocation_index;
uint3 global_invocation_id;
uint3 workgroup_id;
};
kernel void tint_symbol(uint3 tint_symbol_2 [[thread_position_in_threadgroup]], uint tint_symbol_3 [[thread_index_in_threadgroup]], uint3 tint_symbol_4 [[thread_position_in_grid]], uint3 tint_symbol_5 [[threadgroup_position_in_grid]]) {
ComputeInputs const inputs = {.local_invocation_id=tint_symbol_2, .local_invocation_index=tint_symbol_3, .global_invocation_id=tint_symbol_4, .workgroup_id=tint_symbol_5};
uint const foo = (((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x);
return;
}