yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
b61b8218
16.6.0
1#version 310 es 2 3#ifdef GL_EXT_geometry_shader 4#extension GL_EXT_geometry_shader : enable 5#else 6#error no GL_EXT_geometry_shader 7#endif 8 9#ifndef GL_OES_geometry_shader 10#error no GL_OES_geometry_shader 11#endif 12 13precision mediump float ; 14 15in fromVertex { 16in vec3 color ; 17} fromV [] ; 18 19in vec4 nonBlockUnsized [] ; 20 21out toFragment { 22out vec3 color ; 23} toF ; 24 25out fromVertex { // okay to reuse a block name for another block name 26vec3 color ; 27} ; 28 29out fooB { // ERROR, cannot reuse block name as block instance 30vec2 color ; 31} fromVertex ; 32 33int fromVertex ; // ERROR, cannot reuse a block name for something else 34 35out fooC { // ERROR, cannot have same name for block and instance name 36vec2 color ; 37} fooC ; 38 39void main () 40{ 41EmitVertex () ; 42EndPrimitive () ; 43EmitStreamVertex ( 1 ) ; // ERROR 44EndStreamPrimitive ( 0 ) ; // ERROR 45 46color = fromV [ 0 ] . color ; 47gl_ClipDistance [ 3 ] = // ERROR, no ClipDistance 48gl_in [ 1 ] . gl_ClipDistance [ 2 ] ; // ERROR, no ClipDistance 49gl_Position = gl_in [ 0 ] . gl_Position ; 50 51gl_PrimitiveID = gl_PrimitiveIDIn ; 52gl_Layer = 2 ; 53} 54 55layout ( stream = 4 ) out vec4 ov4 ; // ERROR, no streams 56 57layout ( line_strip , points , triangle_strip , points , triangle_strip ) out ; // just means triangle_strip" 58 59out ooutb { vec4 a ; } ouuaa6 ; 60 61layout ( max_vertices = 200 ) out ; 62layout ( max_vertices = 300 ) out ; // ERROR, too big 63void foo ( layout ( max_vertices = 4 ) int a ) // ERROR 64{ 65ouuaa6 . a = vec4 ( 1.0 ) ; 66} 67 68layout ( line_strip , points , triangle_strip , points ) out ; // ERROR, changing output primitive 69layout ( line_strip , points ) out ; // ERROR, changing output primitive 70layout ( triangle_strip ) in ; // ERROR, not an input primitive 71layout ( triangle_strip ) uniform ; // ERROR 72layout ( triangle_strip ) out vec4 badv4 ; // ERROR, not on a variable 73layout ( triangle_strip ) in vec4 bad2v4 [] ; // ERROR, not on a variable or input 74layout ( invocations = 3 ) out outbn { int a ; } ; // 2 ERROR, not on a block, not until 4.0 75out outbn2 { 76layout ( invocations = 3 ) int a ; // 2 ERRORs, not on a block member, not until 4.0 77layout ( max_vertices = 3 ) int b ; // ERROR, not on a block member 78layout ( triangle_strip ) int c ; // ERROR, not on a block member 79} outbi ; 80 81layout ( lines ) out ; // ERROR, not on output 82layout ( lines_adjacency ) in ; 83layout ( triangles ) in ; // ERROR, can't change it 84layout ( triangles_adjacency ) in ; // ERROR, can't change it 85layout ( invocations = 4 ) in ; 86 87in sameName { 88int a15 ; 89} insn [] ; 90 91out sameName { 92float f15 ; 93} ; 94 95uniform sameName { 96bool b15 ; 97} ; 98 99const int summ = gl_MaxVertexAttribs + 100gl_MaxGeometryInputComponents + 101gl_MaxGeometryOutputComponents + 102gl_MaxGeometryImageUniforms + 103gl_MaxGeometryTextureImageUnits + 104gl_MaxGeometryOutputVertices + 105gl_MaxGeometryTotalOutputComponents + 106gl_MaxGeometryUniformComponents + 107gl_MaxGeometryAtomicCounters + 108gl_MaxGeometryAtomicCounterBuffers + 109gl_MaxVertexTextureImageUnits + 110gl_MaxCombinedTextureImageUnits + 111gl_MaxTextureImageUnits + 112gl_MaxDrawBuffers ; 113 114void fooe1 () 115{ 116gl_ViewportIndex ; // ERROR, not in ES 117gl_MaxViewports ; // ERROR, not in ES 118insn . length () ; // 4: lines_adjacency 119int inv = gl_InvocationID ; 120} 121 122in vec4 explArray [ 4 ] ; 123in vec4 explArrayBad [ 5 ] ; // ERROR, wrong size 124in vec4 nonArrayed ; // ERROR, not an array 125flat out vec3 myColor1 ; 126centroid out vec3 myColor2 ; 127centroid in vec3 centr [] ; 128sample out vec4 perSampleColor ; // ERROR without sample extensions 129 130layout ( max_vertices = 200 ) out ; // matching redecl 131 132layout ( location = 7 , component = 2 ) in float comp [] ; // ERROR, es has no component 133 134void notHere () 135{ 136gl_MaxGeometryVaryingComponents ; // ERROR, not in ES 137gl_VerticesIn ; // ERROR, not in ES 138} 139 140void pointSize1 () 141{ 142highp float ps = gl_in [ 3 ] . gl_PointSize ; // ERROR, need point_size extension 143gl_PointSize = ps ; // ERROR, need point_size extension 144} 145 146#extension GL_OES_geometry_point_size : enable 147 148void pointSize2 () 149{ 150highp float ps = gl_in [ 3 ] . gl_PointSize ; 151gl_PointSize = ps ; 152}