Debian Codegraph @

third_party/spirv-cross/reference/opt/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag

raw
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3
4 using namespace metal;
5
6 struct Foo
7 {
8 packed_float3 a;
9 float b;
10 };
11
12 struct buf
13 {
14 Foo results[16];
15 float4 bar;
16 };
17
18 struct main0_out
19 {
20 float4 _entryPointOutput [[color(0)]];
21 };
22
23 fragment main0_out main0(constant buf& _11 [[buffer(0)]], float4 gl_FragCoord [[position]])
24 {
25 main0_out out = {};
26 int _68 = int(gl_FragCoord.x) % 16;
27 out._entryPointOutput = float4(dot(float3(_11.results[_68].a), _11.bar.xyz), _11.results[_68].b, 0.0, 0.0);
28 return out;
29 }
30