third_party/spirv-cross/reference/shaders-msl/comp/functions.comp
raw| 1 | #pragma clang diagnostic ignored "-Wmissing-prototypes" |
| 2 | |
| 3 | #include <metal_stdlib> |
| 4 | #include <simd/simd.h> |
| 5 | |
| 6 | using namespace metal; |
| 7 | |
| 8 | static inline __attribute__((always_inline)) |
| 9 | void myfunc(threadgroup int (&foo)[1337]) |
| 10 | { |
| 11 | foo[0] = 13; |
| 12 | } |
| 13 | |
| 14 | kernel void main0() |
| 15 | { |
| 16 | threadgroup int foo[1337]; |
| 17 | myfunc(foo); |
| 18 | } |
| 19 |