Debian Codegraph @

third_party/spirv-cross/reference/shaders-msl/vulkan/vert/small-storage.vk.vert

raw
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3
4 using namespace metal;
5
6 struct block
7 {
8 short2 a;
9 ushort2 b;
10 char2 c;
11 uchar2 d;
12 half2 e;
13 };
14
15 struct storage
16 {
17 short3 f;
18 ushort3 g;
19 char3 h;
20 uchar3 i;
21 half3 j;
22 };
23
24 struct main0_out
25 {
26 short4 p [[user(locn0)]];
27 ushort4 q [[user(locn1)]];
28 half4 r [[user(locn2)]];
29 float4 gl_Position [[position]];
30 };
31
32 struct main0_in
33 {
34 short foo [[attribute(0)]];
35 ushort bar [[attribute(1)]];
36 half baz [[attribute(2)]];
37 };
38
39 vertex main0_out main0(main0_in in [[stage_in]], constant block& _26 [[buffer(0)]], const device storage& _53 [[buffer(1)]])
40 {
41 main0_out out = {};
42 out.p = short4((int4(int(in.foo)) + int4(int2(_26.a), int2(_26.c))) - int4(int3(_53.f) / int3(_53.h), 1));
43 out.q = ushort4((uint4(uint(in.bar)) + uint4(uint2(_26.b), uint2(_26.d))) - uint4(uint3(_53.g) / uint3(_53.i), 1u));
44 out.r = half4((float4(float(in.baz)) + float4(float2(_26.e), 0.0, 1.0)) - float4(float3(_53.j), 1.0));
45 out.gl_Position = float4(0.0, 0.0, 0.0, 1.0);
46 return out;
47 }
48