SPIRV-Cross/shaders-msl/comp/copy-array-of-arrays.comp
2018-09-12 10:25:51 +02:00

22 lines
524 B
Plaintext

#version 450
layout(local_size_x = 1) in;
layout(set = 0, binding = 0, std430) buffer BUF
{
int a;
float b;
float c;
} o;
void main()
{
const float a[2][2][2] = float[][][](float[][](float[](1.0, 2.0), float[](3.0, 4.0)), float[][](float[](1.0, 2.0), float[](3.0, 4.0)));
float b[2][2][2] = a;
float c[2][2][2] = b;
o.a = int(c[1][1][1]);
float d[2][2][2] = float[][][](float[][](float[](o.b, o.c), float[](o.b, o.b)), float[][](float[](o.c, o.c), float[](o.c, o.b)));
float e[2][2][2] = d;
o.b = e[1][0][1];
}