| 1 |
static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); |
| 2 |
|
| 3 |
RWByteAddressBuffer _28 : register(u0); |
| 4 |
cbuffer UBO : register(b1) |
| 5 |
{ |
| 6 |
int _68_index0 : packoffset(c0); |
| 7 |
int _68_index1 : packoffset(c0.y); |
| 8 |
}; |
| 9 |
|
| 10 |
|
| 11 |
void row_to_col() |
| 12 |
{ |
| 13 |
float4x4 _55 = asfloat(uint4x4(_28.Load(64), _28.Load(80), _28.Load(96), _28.Load(112), _28.Load(68), _28.Load(84), _28.Load(100), _28.Load(116), _28.Load(72), _28.Load(88), _28.Load(104), _28.Load(120), _28.Load(76), _28.Load(92), _28.Load(108), _28.Load(124))); |
| 14 |
_28.Store4(0, asuint(_55[0])); |
| 15 |
_28.Store4(16, asuint(_55[1])); |
| 16 |
_28.Store4(32, asuint(_55[2])); |
| 17 |
_28.Store4(48, asuint(_55[3])); |
| 18 |
float2x2 _58 = asfloat(uint2x2(_28.Load(144), _28.Load(152), _28.Load(148), _28.Load(156))); |
| 19 |
_28.Store2(128, asuint(_58[0])); |
| 20 |
_28.Store2(136, asuint(_58[1])); |
| 21 |
float2x3 _61 = asfloat(uint2x3(_28.Load(192), _28.Load(200), _28.Load(208), _28.Load(196), _28.Load(204), _28.Load(212))); |
| 22 |
_28.Store3(160, asuint(_61[0])); |
| 23 |
_28.Store3(176, asuint(_61[1])); |
| 24 |
float3x2 _64 = asfloat(uint3x2(_28.Load(240), _28.Load(256), _28.Load(244), _28.Load(260), _28.Load(248), _28.Load(264))); |
| 25 |
_28.Store2(216, asuint(_64[0])); |
| 26 |
_28.Store2(224, asuint(_64[1])); |
| 27 |
_28.Store2(232, asuint(_64[2])); |
| 28 |
} |
| 29 |
|
| 30 |
void col_to_row() |
| 31 |
{ |
| 32 |
float4x4 _34 = asfloat(uint4x4(_28.Load4(0), _28.Load4(16), _28.Load4(32), _28.Load4(48))); |
| 33 |
_28.Store(64, asuint(_34[0].x)); |
| 34 |
_28.Store(68, asuint(_34[1].x)); |
| 35 |
_28.Store(72, asuint(_34[2].x)); |
| 36 |
_28.Store(76, asuint(_34[3].x)); |
| 37 |
_28.Store(80, asuint(_34[0].y)); |
| 38 |
_28.Store(84, asuint(_34[1].y)); |
| 39 |
_28.Store(88, asuint(_34[2].y)); |
| 40 |
_28.Store(92, asuint(_34[3].y)); |
| 41 |
_28.Store(96, asuint(_34[0].z)); |
| 42 |
_28.Store(100, asuint(_34[1].z)); |
| 43 |
_28.Store(104, asuint(_34[2].z)); |
| 44 |
_28.Store(108, asuint(_34[3].z)); |
| 45 |
_28.Store(112, asuint(_34[0].w)); |
| 46 |
_28.Store(116, asuint(_34[1].w)); |
| 47 |
_28.Store(120, asuint(_34[2].w)); |
| 48 |
_28.Store(124, asuint(_34[3].w)); |
| 49 |
float2x2 _40 = asfloat(uint2x2(_28.Load2(128), _28.Load2(136))); |
| 50 |
_28.Store(144, asuint(_40[0].x)); |
| 51 |
_28.Store(148, asuint(_40[1].x)); |
| 52 |
_28.Store(152, asuint(_40[0].y)); |
| 53 |
_28.Store(156, asuint(_40[1].y)); |
| 54 |
float2x3 _46 = asfloat(uint2x3(_28.Load3(160), _28.Load3(176))); |
| 55 |
_28.Store(192, asuint(_46[0].x)); |
| 56 |
_28.Store(196, asuint(_46[1].x)); |
| 57 |
_28.Store(200, asuint(_46[0].y)); |
| 58 |
_28.Store(204, asuint(_46[1].y)); |
| 59 |
_28.Store(208, asuint(_46[0].z)); |
| 60 |
_28.Store(212, asuint(_46[1].z)); |
| 61 |
float3x2 _52 = asfloat(uint3x2(_28.Load2(216), _28.Load2(224), _28.Load2(232))); |
| 62 |
_28.Store(240, asuint(_52[0].x)); |
| 63 |
_28.Store(244, asuint(_52[1].x)); |
| 64 |
_28.Store(248, asuint(_52[2].x)); |
| 65 |
_28.Store(256, asuint(_52[0].y)); |
| 66 |
_28.Store(260, asuint(_52[1].y)); |
| 67 |
_28.Store(264, asuint(_52[2].y)); |
| 68 |
} |
| 69 |
|
| 70 |
void write_dynamic_index_row() |
| 71 |
{ |
| 72 |
_28.Store(_68_index0 * 4 + _68_index1 * 16 + 64, asuint(1.0f)); |
| 73 |
_28.Store(_68_index0 * 4 + _68_index1 * 8 + 144, asuint(2.0f)); |
| 74 |
_28.Store(_68_index0 * 4 + _68_index1 * 8 + 192, asuint(3.0f)); |
| 75 |
_28.Store(_68_index0 * 4 + _68_index1 * 16 + 240, asuint(4.0f)); |
| 76 |
_28.Store(_68_index0 * 4 + 64, asuint(1.0f.x)); |
| 77 |
_28.Store(_68_index0 * 4 + 80, asuint(1.0f.xxxx.y)); |
| 78 |
_28.Store(_68_index0 * 4 + 96, asuint(1.0f.xxxx.z)); |
| 79 |
_28.Store(_68_index0 * 4 + 112, asuint(1.0f.xxxx.w)); |
| 80 |
_28.Store(_68_index0 * 4 + 144, asuint(2.0f.x)); |
| 81 |
_28.Store(_68_index0 * 4 + 152, asuint(2.0f.xx.y)); |
| 82 |
_28.Store(_68_index0 * 4 + 192, asuint(3.0f.x)); |
| 83 |
_28.Store(_68_index0 * 4 + 200, asuint(3.0f.xxx.y)); |
| 84 |
_28.Store(_68_index0 * 4 + 208, asuint(3.0f.xxx.z)); |
| 85 |
_28.Store(_68_index0 * 4 + 240, asuint(4.0f.x)); |
| 86 |
_28.Store(_68_index0 * 4 + 256, asuint(4.0f.xx.y)); |
| 87 |
} |
| 88 |
|
| 89 |
void write_dynamic_index_col() |
| 90 |
{ |
| 91 |
_28.Store(_68_index0 * 16 + _68_index1 * 4 + 0, asuint(1.0f)); |
| 92 |
_28.Store(_68_index0 * 8 + _68_index1 * 4 + 128, asuint(2.0f)); |
| 93 |
_28.Store(_68_index0 * 16 + _68_index1 * 4 + 160, asuint(3.0f)); |
| 94 |
_28.Store(_68_index0 * 8 + _68_index1 * 4 + 216, asuint(4.0f)); |
| 95 |
_28.Store4(_68_index0 * 16 + 0, asuint(1.0f.xxxx)); |
| 96 |
_28.Store2(_68_index0 * 8 + 128, asuint(2.0f.xx)); |
| 97 |
_28.Store3(_68_index0 * 16 + 160, asuint(3.0f.xxx)); |
| 98 |
_28.Store2(_68_index0 * 8 + 216, asuint(4.0f.xx)); |
| 99 |
} |
| 100 |
|
| 101 |
void read_dynamic_index_row() |
| 102 |
{ |
| 103 |
float a0 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 16 + 64)); |
| 104 |
float a1 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 8 + 144)); |
| 105 |
float a2 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 8 + 192)); |
| 106 |
float a3 = asfloat(_28.Load(_68_index0 * 4 + _68_index1 * 16 + 240)); |
| 107 |
float4 v0 = asfloat(uint4(_28.Load(_68_index0 * 4 + 64), _28.Load(_68_index0 * 4 + 80), _28.Load(_68_index0 * 4 + 96), _28.Load(_68_index0 * 4 + 112))); |
| 108 |
float2 v1 = asfloat(uint2(_28.Load(_68_index0 * 4 + 144), _28.Load(_68_index0 * 4 + 152))); |
| 109 |
float3 v2 = asfloat(uint3(_28.Load(_68_index0 * 4 + 192), _28.Load(_68_index0 * 4 + 200), _28.Load(_68_index0 * 4 + 208))); |
| 110 |
float2 v3 = asfloat(uint2(_28.Load(_68_index0 * 4 + 240), _28.Load(_68_index0 * 4 + 256))); |
| 111 |
} |
| 112 |
|
| 113 |
void read_dynamic_index_col() |
| 114 |
{ |
| 115 |
float a0 = asfloat(_28.Load(_68_index0 * 16 + _68_index1 * 4 + 0)); |
| 116 |
float a1 = asfloat(_28.Load(_68_index0 * 8 + _68_index1 * 4 + 128)); |
| 117 |
float a2 = asfloat(_28.Load(_68_index0 * 16 + _68_index1 * 4 + 160)); |
| 118 |
float a3 = asfloat(_28.Load(_68_index0 * 8 + _68_index1 * 4 + 216)); |
| 119 |
float4 v0 = asfloat(_28.Load4(_68_index0 * 16 + 0)); |
| 120 |
float2 v1 = asfloat(_28.Load2(_68_index0 * 8 + 128)); |
| 121 |
float3 v2 = asfloat(_28.Load3(_68_index0 * 16 + 160)); |
| 122 |
float2 v3 = asfloat(_28.Load2(_68_index0 * 8 + 216)); |
| 123 |
} |
| 124 |
|
| 125 |
void comp_main() |
| 126 |
{ |
| 127 |
row_to_col(); |
| 128 |
col_to_row(); |
| 129 |
write_dynamic_index_row(); |
| 130 |
write_dynamic_index_col(); |
| 131 |
read_dynamic_index_row(); |
| 132 |
read_dynamic_index_col(); |
| 133 |
} |
| 134 |
|
| 135 |
[numthreads(1, 1, 1)] |
| 136 |
void main() |
| 137 |
{ |
| 138 |
comp_main(); |
| 139 |
} |