dawn-cmake/test/tint/expressions/index/var/let/param/array.wgsl.expected.msl

14 lines
208 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_array_wrapper {
int arr[8];
};
int f(int x) {
tint_array_wrapper a = {.arr={1, 2, 3, 4, 5, 6, 7, 8}};
int const i = x;
return a.arr[i];
}