Debian Codegraph @

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

raw
1 #version 450
2 #if defined(GL_AMD_gpu_shader_int16)
3 #extension GL_AMD_gpu_shader_int16 : require
4 #else
5 #error No extension available for Int16.
6 #endif
7 #extension GL_EXT_shader_explicit_arithmetic_types_int8 : require
8 #if defined(GL_AMD_gpu_shader_half_float)
9 #extension GL_AMD_gpu_shader_half_float : require
10 #elif defined(GL_NV_gpu_shader5)
11 #extension GL_NV_gpu_shader5 : require
12 #else
13 #error No extension available for FP16.
14 #endif
15
16 layout(binding = 0, std140) uniform block
17 {
18 i16vec2 a;
19 u16vec2 b;
20 i8vec2 c;
21 u8vec2 d;
22 f16vec2 e;
23 } _26;
24
25 layout(binding = 1, std430) readonly buffer storage
26 {
27 i16vec3 f;
28 u16vec3 g;
29 i8vec3 h;
30 u8vec3 i;
31 f16vec3 j;
32 } _53;
33
34 struct pushconst
35 {
36 i16vec4 k;
37 u16vec4 l;
38 i8vec4 m;
39 u8vec4 n;
40 f16vec4 o;
41 };
42
43 uniform pushconst _76;
44
45 layout(location = 0) out i16vec4 p;
46 layout(location = 0, component = 0) in int16_t foo;
47 layout(location = 1) out u16vec4 q;
48 layout(location = 0, component = 1) in uint16_t bar;
49 layout(location = 2) out f16vec4 r;
50 layout(location = 1) in float16_t baz;
51
52 void main()
53 {
54 p = i16vec4((((ivec4(int(foo)) + ivec4(ivec2(_26.a), ivec2(_26.c))) - ivec4(ivec3(_53.f) / ivec3(_53.h), 1)) + ivec4(_76.k)) + ivec4(_76.m));
55 q = u16vec4((((uvec4(uint(bar)) + uvec4(uvec2(_26.b), uvec2(_26.d))) - uvec4(uvec3(_53.g) / uvec3(_53.i), 1u)) + uvec4(_76.l)) + uvec4(_76.n));
56 r = f16vec4(((vec4(float(baz)) + vec4(vec2(_26.e), 0.0, 1.0)) - vec4(vec3(_53.j), 1.0)) + vec4(_76.o));
57 gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
58 }
59