yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
aa0298bf
vulkan-sdk-1.4.357.0
1#version 400 2 3layout ( constant_id = 16 ) const int arraySize = 5 ; 4in vec4 ucol [ arraySize ] ; 5 6layout ( constant_id = 17 ) const bool spBool = true ; 7layout ( constant_id = 18 ) const float spFloat = 3.14 ; 8layout ( constant_id = 19 ) const double spDouble = 3.1415926535897932384626433832795 ; 9layout ( constant_id = 22 ) const uint scale = 2 ; 10 11layout ( constant_id = 24 ) gl_MaxImageUnits ; 12 13out vec4 color ; 14out int size ; 15 16// parameter should be considered same type as ucol 17void foo ( vec4 p [ arraySize ]) ; 18 19void main () 20{ 21color = ucol [ 2 ] ; 22size = arraySize ; 23if ( spBool ) 24color *= scale ; 25color += float ( spDouble / spFloat ) ; 26 27foo ( ucol ) ; 28} 29 30layout ( constant_id = 116 ) const int dupArraySize = 12 ; 31in vec4 dupUcol [ dupArraySize ] ; 32 33layout ( constant_id = 117 ) const bool spDupBool = true ; 34layout ( constant_id = 118 ) const float spDupFloat = 3.14 ; 35layout ( constant_id = 119 ) const double spDupDouble = 3.1415926535897932384626433832795 ; 36layout ( constant_id = 122 ) const uint dupScale = 2 ; 37 38void foo ( vec4 p [ arraySize ]) 39{ 40color += dupUcol [ 2 ] ; 41size += dupArraySize ; 42if ( spDupBool ) 43color *= dupScale ; 44color += float ( spDupDouble / spDupFloat ) ; 45} 46 47int builtin_spec_constant () 48{ 49int result = gl_MaxImageUnits ; 50return result ; 51}