77 lines
1.8 KiB
Plaintext
77 lines
1.8 KiB
Plaintext
struct Baz
|
|
{
|
|
float c;
|
|
};
|
|
|
|
struct Bar
|
|
{
|
|
float d[2][4];
|
|
Baz baz[2];
|
|
};
|
|
|
|
struct Foo
|
|
{
|
|
column_major float2x2 a;
|
|
float2 b;
|
|
Bar c[5];
|
|
};
|
|
|
|
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u);
|
|
|
|
RWByteAddressBuffer _10 : register(u0);
|
|
|
|
void comp_main()
|
|
{
|
|
Foo _64;
|
|
_64.a = asfloat(uint2x2(_10.Load(0), _10.Load(8), _10.Load(4), _10.Load(12)));
|
|
_64.b = asfloat(uint2(_10.Load(16), _10.Load(24)));
|
|
[unroll]
|
|
for (int _0ident = 0; _0ident < 5; _0ident++)
|
|
{
|
|
[unroll]
|
|
for (int _1ident = 0; _1ident < 2; _1ident++)
|
|
{
|
|
[unroll]
|
|
for (int _2ident = 0; _2ident < 4; _2ident++)
|
|
{
|
|
_64.c[_0ident].d[_1ident][_2ident] = asfloat(_10.Load(_2ident * 4 + _1ident * 16 + _0ident * 40 + 24));
|
|
}
|
|
}
|
|
[unroll]
|
|
for (int _3ident = 0; _3ident < 2; _3ident++)
|
|
{
|
|
_64.c[_0ident].baz[_3ident].c = asfloat(_10.Load(_3ident * 4 + _0ident * 40 + 56));
|
|
}
|
|
}
|
|
_10.Store(224, asuint(_64.a[0].x));
|
|
_10.Store(228, asuint(_64.a[1].x));
|
|
_10.Store(232, asuint(_64.a[0].y));
|
|
_10.Store(236, asuint(_64.a[1].y));
|
|
_10.Store(240, asuint(_64.b.x));
|
|
_10.Store(248, asuint(_64.b.y));
|
|
[unroll]
|
|
for (int _4ident = 0; _4ident < 5; _4ident++)
|
|
{
|
|
[unroll]
|
|
for (int _5ident = 0; _5ident < 2; _5ident++)
|
|
{
|
|
[unroll]
|
|
for (int _6ident = 0; _6ident < 4; _6ident++)
|
|
{
|
|
_10.Store(_6ident * 4 + _5ident * 16 + _4ident * 40 + 248, asuint(_64.c[_4ident].d[_5ident][_6ident]));
|
|
}
|
|
}
|
|
[unroll]
|
|
for (int _7ident = 0; _7ident < 2; _7ident++)
|
|
{
|
|
_10.Store(_7ident * 4 + _4ident * 40 + 280, asuint(_64.c[_4ident].baz[_7ident].c));
|
|
}
|
|
}
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main()
|
|
{
|
|
comp_main();
|
|
}
|