yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
ad54b24f
16.4.0
1#version 150 core 2 3in fromVertex { 4in vec3 color ; 5} fromV [] ; 6 7out toFragment { 8out vec3 color ; 9} toF ; 10 11out fromVertex { // okay to reuse a block name for another block name 12vec3 color ; 13} ; 14 15out fooB { 16vec2 color ; 17} fromVertex ; // ERROR, cannot reuse block name as block instance 18 19int fromVertex ; // ERROR, cannot reuse a block name for something else 20 21out fooC { 22vec2 color ; 23} fooC ; // ERROR, cannot have same name for block and instance name 24 25void main () 26{ 27EmitVertex () ; 28EndPrimitive () ; 29EmitStreamVertex ( 1 ) ; // ERROR 30EndStreamPrimitive ( 0 ) ; // ERROR 31 32color = fromV [ 0 ] . color ; 33gl_ClipDistance [ 3 ] = gl_in [ 1 ] . gl_ClipDistance [ 2 ] ; 34gl_Position = gl_in [ 0 ] . gl_Position ; 35gl_PointSize = gl_in [ 3 ] . gl_PointSize ; 36gl_PrimitiveID = gl_PrimitiveIDIn ; 37gl_Layer = 2 ; 38} 39 40out vec4 ov0 ; // stream should be 0 41layout ( stream = 4 ) out vec4 ov4 ; 42out vec4 o1v0 ; // stream should be 0 43 44layout ( stream = 3 ) uniform ; // ERROR 45layout ( stream = 3 ) in ; // ERROR 46layout ( stream = 3 ) uniform int ua ; // ERROR 47layout ( stream = 3 ) uniform ubb { int ua ; } ibb ; // ERROR 48 49layout ( line_strip , points , triangle_strip , stream = 3 , points , triangle_strip ) out ; // just means "stream = 3, triangle_strip" 50layout ( stream = 3 , triangle_strip ) out ; 51out vec4 ov3 ; // stream should be 3 52 53layout ( stream = 6 ) out ooutb { vec4 a ; } ouuaa6 ; 54 55layout ( stream = 6 ) out ooutb2 { 56layout ( stream = 6 ) vec4 a ; 57} ouua6 ; 58 59layout ( stream = 7 ) out ooutb3 { 60layout ( stream = 6 ) vec4 a ; // ERROR 61} ouua7 ; 62 63out vec4 ov2s3 ; // stream should be 3 64 65layout ( max_vertices = 200 ) out ; 66layout ( max_vertices = 300 ) out ; // ERROR, too big 67void foo ( layout ( max_vertices = 4 ) int a ) // ERROR 68{ 69ouuaa6 . a = vec4 ( 1.0 ) ; 70} 71 72layout ( line_strip , points , triangle_strip , stream = 3 , points ) out ; // ERROR, changing output primitive 73layout ( line_strip , points , stream = 3 ) out ; // ERROR, changing output primitive 74layout ( triangle_strip ) in ; // ERROR, not an input primitive 75layout ( triangle_strip ) uniform ; // ERROR 76layout ( triangle_strip ) out vec4 badv4 ; // ERROR, not on a variable 77layout ( triangle_strip ) in vec4 bad2v4 [] ; // ERROR, not on a variable or input 78layout ( invocations = 3 ) out outbn { int a ; } ; // 2 ERROR, not on a block, not until 4.0 79out outbn2 { 80layout ( invocations = 3 ) int a ; // 2 ERRORs, not on a block member, not until 4.0 81layout ( max_vertices = 3 ) int b ; // ERROR, not on a block member 82layout ( triangle_strip ) int c ; // ERROR, not on a block member 83} outbi ; 84 85layout ( lines ) out ; // ERROR, not on output 86layout ( lines_adjacency ) in ; 87layout ( triangles ) in ; // ERROR, can't change it 88layout ( triangles_adjacency ) in ; // ERROR, can't change it 89layout ( invocations = 4 ) in ; // ERROR, not until 4.0 90 91in inbn { 92layout ( stream = 2 ) int a ; // ERROR, stream on input 93} inbi [] ; 94 95in sameName { 96int a15 ; 97} insn [] ; 98 99out sameName { 100float f15 ; 101} ; 102 103uniform sameName { 104bool b15 ; 105} ; 106 107float summ = gl_MaxVertexAttribs + 108gl_MaxVertexUniformComponents + 109gl_MaxVaryingFloats + 110gl_MaxVaryingComponents + 111gl_MaxVertexOutputComponents + 112gl_MaxGeometryInputComponents + 113gl_MaxGeometryOutputComponents + 114gl_MaxFragmentInputComponents + 115gl_MaxVertexTextureImageUnits + 116gl_MaxCombinedTextureImageUnits + 117gl_MaxTextureImageUnits + 118gl_MaxFragmentUniformComponents + 119gl_MaxDrawBuffers + 120gl_MaxClipDistances + 121gl_MaxGeometryTextureImageUnits + 122gl_MaxGeometryOutputVertices + 123gl_MaxGeometryTotalOutputComponents + 124gl_MaxGeometryUniformComponents + 125gl_MaxGeometryVaryingComponents ; 126 127void fooe1 () 128{ 129gl_ViewportIndex = gl_MaxViewports - 1 ; 130} 131 132#extension GL_ARB_viewport_array : enable 133 134void fooe2 () 135{ 136gl_ViewportIndex = gl_MaxViewports - 1 ; 137} 138 139out int gl_ViewportIndex ;