| 1 |
#include <metal_stdlib> |
| 2 |
#include <simd/simd.h> |
| 3 |
|
| 4 |
using namespace metal; |
| 5 |
|
| 6 |
struct S0 |
| 7 |
{ |
| 8 |
float2 a[1]; |
| 9 |
float b; |
| 10 |
char _m0_final_padding[4]; |
| 11 |
}; |
| 12 |
|
| 13 |
struct S1 |
| 14 |
{ |
| 15 |
packed_float3 a; |
| 16 |
float b; |
| 17 |
}; |
| 18 |
|
| 19 |
struct S2 |
| 20 |
{ |
| 21 |
float3 a[1]; |
| 22 |
float b; |
| 23 |
char _m0_final_padding[12]; |
| 24 |
}; |
| 25 |
|
| 26 |
struct S3 |
| 27 |
{ |
| 28 |
float2 a; |
| 29 |
float b; |
| 30 |
}; |
| 31 |
|
| 32 |
struct S4 |
| 33 |
{ |
| 34 |
float2 c; |
| 35 |
}; |
| 36 |
|
| 37 |
struct Content |
| 38 |
{ |
| 39 |
S0 m0s[1]; |
| 40 |
S1 m1s[1]; |
| 41 |
S2 m2s[1]; |
| 42 |
S0 m0; |
| 43 |
S1 m1; |
| 44 |
S2 m2; |
| 45 |
S3 m3; |
| 46 |
float m4; |
| 47 |
S4 m3s[8]; |
| 48 |
char _m0_final_padding[8]; |
| 49 |
}; |
| 50 |
|
| 51 |
struct SSBO1 |
| 52 |
{ |
| 53 |
Content content; |
| 54 |
Content content1[2]; |
| 55 |
Content content2; |
| 56 |
float2x2 m0; |
| 57 |
float2x2 m1; |
| 58 |
float2x3 m2[4]; |
| 59 |
float3x2 m3; |
| 60 |
float2x2 m4; |
| 61 |
float2x2 m5[9]; |
| 62 |
float3x2 m6[4][2]; |
| 63 |
float2x3 m7; |
| 64 |
float array[1]; |
| 65 |
}; |
| 66 |
|
| 67 |
struct S0_1 |
| 68 |
{ |
| 69 |
float2 a[1]; |
| 70 |
char _m1_pad[8]; |
| 71 |
float b; |
| 72 |
char _m0_final_padding[12]; |
| 73 |
}; |
| 74 |
|
| 75 |
struct S1_1 |
| 76 |
{ |
| 77 |
packed_float3 a; |
| 78 |
float b; |
| 79 |
}; |
| 80 |
|
| 81 |
struct S2_1 |
| 82 |
{ |
| 83 |
float3 a[1]; |
| 84 |
float b; |
| 85 |
char _m0_final_padding[12]; |
| 86 |
}; |
| 87 |
|
| 88 |
struct S3_1 |
| 89 |
{ |
| 90 |
float2 a; |
| 91 |
float b; |
| 92 |
}; |
| 93 |
|
| 94 |
struct S4_1 |
| 95 |
{ |
| 96 |
float2 c; |
| 97 |
char _m0_final_padding[8]; |
| 98 |
}; |
| 99 |
|
| 100 |
struct Content_1 |
| 101 |
{ |
| 102 |
S0_1 m0s[1]; |
| 103 |
S1_1 m1s[1]; |
| 104 |
S2_1 m2s[1]; |
| 105 |
S0_1 m0; |
| 106 |
S1_1 m1; |
| 107 |
S2_1 m2; |
| 108 |
S3_1 m3; |
| 109 |
float m4; |
| 110 |
char _m8_pad[8]; |
| 111 |
S4_1 m3s[8]; |
| 112 |
}; |
| 113 |
|
| 114 |
struct SSBO0 |
| 115 |
{ |
| 116 |
Content_1 content; |
| 117 |
Content_1 content1[2]; |
| 118 |
Content_1 content2; |
| 119 |
float4 array[1]; |
| 120 |
}; |
| 121 |
|
| 122 |
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); |
| 123 |
|
| 124 |
kernel void main0(device SSBO1& ssbo_430 [[buffer(0)]], device SSBO0& ssbo_140 [[buffer(1)]]) |
| 125 |
{ |
| 126 |
Content_1 _60 = ssbo_140.content; |
| 127 |
ssbo_430.content.m0s[0].a[0] = _60.m0s[0].a[0]; |
| 128 |
ssbo_430.content.m0s[0].b = _60.m0s[0].b; |
| 129 |
ssbo_430.content.m1s[0].a = float3(_60.m1s[0].a); |
| 130 |
ssbo_430.content.m1s[0].b = _60.m1s[0].b; |
| 131 |
ssbo_430.content.m2s[0].a[0] = _60.m2s[0].a[0]; |
| 132 |
ssbo_430.content.m2s[0].b = _60.m2s[0].b; |
| 133 |
ssbo_430.content.m0.a[0] = _60.m0.a[0]; |
| 134 |
ssbo_430.content.m0.b = _60.m0.b; |
| 135 |
ssbo_430.content.m1.a = float3(_60.m1.a); |
| 136 |
ssbo_430.content.m1.b = _60.m1.b; |
| 137 |
ssbo_430.content.m2.a[0] = _60.m2.a[0]; |
| 138 |
ssbo_430.content.m2.b = _60.m2.b; |
| 139 |
ssbo_430.content.m3.a = _60.m3.a; |
| 140 |
ssbo_430.content.m3.b = _60.m3.b; |
| 141 |
ssbo_430.content.m4 = _60.m4; |
| 142 |
ssbo_430.content.m3s[0].c = _60.m3s[0].c; |
| 143 |
ssbo_430.content.m3s[1].c = _60.m3s[1].c; |
| 144 |
ssbo_430.content.m3s[2].c = _60.m3s[2].c; |
| 145 |
ssbo_430.content.m3s[3].c = _60.m3s[3].c; |
| 146 |
ssbo_430.content.m3s[4].c = _60.m3s[4].c; |
| 147 |
ssbo_430.content.m3s[5].c = _60.m3s[5].c; |
| 148 |
ssbo_430.content.m3s[6].c = _60.m3s[6].c; |
| 149 |
ssbo_430.content.m3s[7].c = _60.m3s[7].c; |
| 150 |
ssbo_430.content.m1.a = ssbo_430.content.m3.a * ssbo_430.m6[1][1]; |
| 151 |
} |
| 152 |
|