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