blob: 56896d1d66ed76a666de14f0f1ba6782811b36c3 [file] [log] [blame]
James Priced68d3a92022-04-07 13:42:45 +00001#include <metal_stdlib>
James Priceb02fe312022-04-07 13:42:45 +00002
James Priced68d3a92022-04-07 13:42:45 +00003using namespace metal;
Ben Claytonf47887d2022-06-24 17:01:59 +00004
5template<typename T, size_t N>
6struct tint_array {
7 const constant T& operator[](size_t i) const constant { return elements[i]; }
8 device T& operator[](size_t i) device { return elements[i]; }
9 const device T& operator[](size_t i) const device { return elements[i]; }
10 thread T& operator[](size_t i) thread { return elements[i]; }
11 const thread T& operator[](size_t i) const thread { return elements[i]; }
12 threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
13 const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
14 T elements[N];
15};
16
17void tint_symbol(device tint_array<uint, 1>* const tint_symbol_2) {
James Priced68d3a92022-04-07 13:42:45 +000018 (*(tint_symbol_2))[1] = ((*(tint_symbol_2))[1] - 1u);
James Priceb02fe312022-04-07 13:42:45 +000019}
20