50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
|
|
template<typename T, size_t N>
|
|
struct tint_array {
|
|
const constant T& operator[](size_t i) const constant { return elements[i]; }
|
|
device T& operator[](size_t i) device { return elements[i]; }
|
|
const device T& operator[](size_t i) const device { return elements[i]; }
|
|
thread T& operator[](size_t i) thread { return elements[i]; }
|
|
const thread T& operator[](size_t i) const thread { return elements[i]; }
|
|
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
|
|
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
|
|
T elements[N];
|
|
};
|
|
|
|
struct S {
|
|
/* 0x0000 */ int before;
|
|
/* 0x0004 */ tint_array<int8_t, 4> tint_pad;
|
|
/* 0x0008 */ float3x2 m;
|
|
/* 0x0020 */ tint_array<int8_t, 40> tint_pad_1;
|
|
/* 0x0048 */ int after;
|
|
/* 0x004c */ tint_array<int8_t, 4> tint_pad_2;
|
|
};
|
|
|
|
void a(tint_array<S, 4> a_1) {
|
|
}
|
|
|
|
void b(S s) {
|
|
}
|
|
|
|
void c(float3x2 m) {
|
|
}
|
|
|
|
void d(float2 v) {
|
|
}
|
|
|
|
void e(float f_1) {
|
|
}
|
|
|
|
kernel void f(const constant tint_array<S, 4>* tint_symbol [[buffer(0)]]) {
|
|
a(*(tint_symbol));
|
|
b((*(tint_symbol))[2]);
|
|
c((*(tint_symbol))[2].m);
|
|
d(float2((*(tint_symbol))[0].m[1]).yx);
|
|
e(float2((*(tint_symbol))[0].m[1]).yx[0]);
|
|
return;
|
|
}
|
|
|