yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
516724d9
main
1#version 450 2#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require 3 4// Each buffer below captures a type through an array and states a stride that 5// is illegal for that type's width. All four must be diagnosed. 6 7// 32-bit through a flat array: stride must be a multiple of 4. 8layout ( xfb_buffer = 0 , xfb_stride = 6 ) out ; 9layout ( location = 0 , xfb_buffer = 0 , xfb_offset = 0 ) out float arr [ 1 ] ; 10 11// 32-bit through a nested array: same rule, one more level of recursion. 12layout ( xfb_buffer = 1 , xfb_stride = 18 ) out ; 13layout ( location = 1 , xfb_buffer = 1 , xfb_offset = 0 ) out float nested [ 2 ][ 2 ] ; 14 15// 64-bit through an array: stride must be a multiple of 8. 16layout ( xfb_buffer = 2 , xfb_stride = 12 ) out ; 17layout ( location = 5 , xfb_buffer = 2 , xfb_offset = 0 ) out double darr [ 1 ] ; 18 19// 16-bit through an array: stride must be a multiple of 2. 20layout ( xfb_buffer = 3 , xfb_stride = 3 ) out ; 21layout ( location = 7 , xfb_buffer = 3 , xfb_offset = 0 ) out float16_t harr [ 1 ] ; 22 23void main () 24{ 25arr [ 0 ] = 1.0 ; 26nested [ 0 ][ 0 ] = 2.0 ; 27darr [ 0 ] = 3.0LF ; 28harr [ 0 ] = float16_t ( 4.0 ) ; 29}