| 1 |
struct Baz |
| 2 |
{ |
| 3 |
float c; |
| 4 |
}; |
| 5 |
|
| 6 |
struct Bar |
| 7 |
{ |
| 8 |
float d[2][4]; |
| 9 |
Baz baz[2]; |
| 10 |
}; |
| 11 |
|
| 12 |
struct Foo |
| 13 |
{ |
| 14 |
column_major float2x2 a; |
| 15 |
float2 b; |
| 16 |
Bar c[5]; |
| 17 |
}; |
| 18 |
|
| 19 |
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); |
| 20 |
|
| 21 |
RWByteAddressBuffer _10 : register(u0); |
| 22 |
|
| 23 |
void comp_main() |
| 24 |
{ |
| 25 |
Foo _64; |
| 26 |
_64.a = asfloat(uint2x2(_10.Load(0), _10.Load(8), _10.Load(4), _10.Load(12))); |
| 27 |
_64.b = asfloat(_10.Load2(16)); |
| 28 |
[unroll] |
| 29 |
for (int _0ident = 0; _0ident < 5; _0ident++) |
| 30 |
{ |
| 31 |
[unroll] |
| 32 |
for (int _1ident = 0; _1ident < 2; _1ident++) |
| 33 |
{ |
| 34 |
[unroll] |
| 35 |
for (int _2ident = 0; _2ident < 4; _2ident++) |
| 36 |
{ |
| 37 |
_64.c[_0ident].d[_1ident][_2ident] = asfloat(_10.Load(_2ident * 4 + _1ident * 16 + _0ident * 40 + 24)); |
| 38 |
} |
| 39 |
} |
| 40 |
[unroll] |
| 41 |
for (int _3ident = 0; _3ident < 2; _3ident++) |
| 42 |
{ |
| 43 |
_64.c[_0ident].baz[_3ident].c = asfloat(_10.Load(_3ident * 4 + _0ident * 40 + 56)); |
| 44 |
} |
| 45 |
} |
| 46 |
_10.Store(224, asuint(_64.a[0].x)); |
| 47 |
_10.Store(228, asuint(_64.a[1].x)); |
| 48 |
_10.Store(232, asuint(_64.a[0].y)); |
| 49 |
_10.Store(236, asuint(_64.a[1].y)); |
| 50 |
_10.Store2(240, asuint(_64.b)); |
| 51 |
[unroll] |
| 52 |
for (int _4ident = 0; _4ident < 5; _4ident++) |
| 53 |
{ |
| 54 |
[unroll] |
| 55 |
for (int _5ident = 0; _5ident < 2; _5ident++) |
| 56 |
{ |
| 57 |
[unroll] |
| 58 |
for (int _6ident = 0; _6ident < 4; _6ident++) |
| 59 |
{ |
| 60 |
_10.Store(_6ident * 4 + _5ident * 16 + _4ident * 40 + 248, asuint(_64.c[_4ident].d[_5ident][_6ident])); |
| 61 |
} |
| 62 |
} |
| 63 |
[unroll] |
| 64 |
for (int _7ident = 0; _7ident < 2; _7ident++) |
| 65 |
{ |
| 66 |
_10.Store(_7ident * 4 + _4ident * 40 + 280, asuint(_64.c[_4ident].baz[_7ident].c)); |
| 67 |
} |
| 68 |
} |
| 69 |
} |
| 70 |
|
| 71 |
[numthreads(1, 1, 1)] |
| 72 |
void main() |
| 73 |
{ |
| 74 |
comp_main(); |
| 75 |
} |