1#version 450 core 2 3// GL_EXT_shader_16bit_storage doesn't support input/output. 4#extension GL_EXT_shader_8bit_storage : require 5#extension GL_AMD_gpu_shader_int16 : require 6#extension GL_AMD_gpu_shader_half_float : require 7 8layout(location = 0) in int16_t foo; 9layout(location = 1) in uint16_t bar; 10layout(location = 2) in float16_t baz; 11 12layout(binding = 0) uniform block { 13 i16vec2 a; 14 u16vec2 b; 15 i8vec2 c; 16 u8vec2 d; 17 f16vec2 e; 18}; 19 20layout(binding = 1) readonly buffer storage { 21 i16vec3 f; 22 u16vec3 g; 23 i8vec3 h; 24 u8vec3 i; 25 f16vec3 j; 26}; 27 28layout(location = 0) out i16vec4 p; 29layout(location = 1) out u16vec4 q; 30layout(location = 2) out f16vec4 r; 31 32void main() { 33 p = i16vec4(int(foo) + ivec4(ivec2(a), ivec2(c)) - ivec4(ivec3(f) / ivec3(h), 1)); 34 q = u16vec4(uint(bar) + uvec4(uvec2(b), uvec2(d)) - uvec4(uvec3(g) / uvec3(i), 1)); 35 r = f16vec4(float(baz) + vec4(vec2(e), 0, 1) - vec4(vec3(j), 1)); 36 gl_Position = vec4(0, 0, 0, 1); 37} 38 39