yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
b0f4b427
main
1#version 440 core 2 3layout ( std140 , row_major ) uniform nameless { 4vec3 anonMember1 ; 5mat3x2 m23 ; 6int scalarAfterm23 ; 7vec4 anonDeadMember2 ; 8vec4 anonMember3 ; 9int scalarBeforeArray ; 10float floatArray [ 5 ] ; 11int scalarAfterArray ; 12mat2x2 m22 [ 9 ] ; 13} ; 14 15layout ( std140 , column_major ) uniform c_nameless { 16vec3 c_anonMember1 ; 17mat3x2 c_m23 ; 18int c_scalarAfterm23 ; 19vec4 c_anonDeadMember2 ; 20vec4 c_anonMember3 ; 21} ; 22 23layout ( std140 ) uniform named { 24vec3 deadMember1 ; 25int scalar ; 26vec4 member2 ; 27vec4 member3 ; 28vec2 memvec2 ; 29float memf1 ; 30bool memf2 ; 31int memf3 ; 32vec2 memvec2a ; 33mat2x2 m22 [ 7 ] ; 34} ablock ; 35 36layout ( std140 ) uniform namelessdead { 37int a ; 38} ; 39 40layout ( std140 ) uniform namedDead { 41int b ; 42} bblock ; 43 44struct N1 { 45float a ; 46} ; 47 48struct N2 { 49float b ; 50float c ; 51float d ; 52} ; 53 54struct N3 { 55N1 n1 ; 56N2 n2 ; 57} ; 58 59layout ( std140 ) uniform nested { 60N3 foo ; 61} nest ; 62 63layout ( std140 ) uniform nested2 { 64vec4 padding ; // offset 0, size 16 65N3 a ; // offset 16, size 32 66N1 b [ 4 ] ; // offset 48, size 64 67N1 c [ 2 ] ; // offset 112, size 32 68N1 d [ 4 ] ; // offset 144, size 64 69} nest2 ; 70 71struct TS { 72int a ; 73int dead ; 74} ; 75 76uniform TS s ; 77 78uniform float uf1 ; 79uniform float uf2 ; 80uniform float ufDead3 ; 81uniform float ufDead4 ; 82 83uniform writeonly uimage2D image_ui2D ; 84uniform sampler2D sampler_2D ; 85uniform sampler2DMSArray sampler_2DMSArray ; 86 87uniform mat2 dm22 [ 10 ] ; 88 89struct deep1 { 90vec2 va [ 3 ] ; 91bool b ; 92} ; 93 94struct deep2 { 95int i ; 96deep1 d1 [ 4 ] ; 97} ; 98 99struct deep3 { 100vec4 iv4 ; 101deep2 d2 ; 102ivec3 v3 ; 103} ; 104 105in float attributeFloat ; 106layout ( location = 2 ) in vec2 attributeFloat2 ; 107in vec3 attributeFloat3 ; 108in vec4 attributeFloat4 ; 109in mat4 attributeMat4 ; 110in float attributeFloatArray [ 3 ] ; 111 112uniform deep3 deepA [ 2 ] , deepB [ 2 ] , deepC [ 3 ] , deepD [ 2 ] ; 113 114const bool control = true ; 115 116void deadFunction () 117{ 118vec3 v3 = ablock . deadMember1 ; 119vec4 v = anonDeadMember2 ; 120float f = ufDead4 ; 121} 122 123void liveFunction2 () 124{ 125vec3 v = anonMember1 ; 126float f = uf1 ; 127} 128 129void liveFunction1 ( writeonly uimage2D p_ui2D , sampler2D p_2D , sampler2DMSArray p_2DMSArray ) 130 131{ 132liveFunction2 () ; 133float f = uf2 ; 134vec4 v = ablock . member3 ; 135} 136 137uniform abl { 138float foo ; 139} arrBl [ 4 ] ; 140 141uniform abl2 { 142float foo ; 143} arrBl2 [ 4 ] ; 144 145buffer buf1 { 146float scalar ; 147float runtimeArray [] ; 148} buf1i ; 149 150buffer buf2 { 151float scalar ; 152N2 runtimeArray [] ; 153} buf2i ; 154 155buffer buf3 { 156float scalar ; 157float runtimeArray [] ; 158} buf3i ; 159 160buffer buf4 { 161float scalar ; 162N2 runtimeArray [] ; 163} buf4i ; 164 165struct VertexInfo { 166float position [ 3 ] ; 167float normal [ 3 ] ; 168} ; 169 170struct TriangleInfo { 171VertexInfo v [ 3 ] ; 172} ; 173 174buffer VertexCollection { 175TriangleInfo t [ 5 ] ; 176uint padding [ 10 ] ; 177} ; 178 179out float outval ; 180 181void main () 182{ 183liveFunction1 ( image_ui2D , sampler_2D , sampler_2DMSArray ) ; 184liveFunction2 () ; 185 186if ( ! control ) 187deadFunction () ; 188 189float f ; 190int i ; 191if ( control ) { 192liveFunction2 () ; 193f = anonMember3 . z ; 194f = s . a ; 195f = ablock . scalar ; 196f = m23 [ 1 ] . y + scalarAfterm23 ; 197f = c_m23 [ 1 ] . y + c_scalarAfterm23 ; 198f += scalarBeforeArray ; 199f += floatArray [ 2 ] ; 200f += floatArray [ 4 ] ; 201f += scalarAfterArray ; 202f += ablock . memvec2 . x ; 203f += ablock . memf1 ; 204f += float ( ablock . memf2 ) ; 205f += ablock . memf3 ; 206f += ablock . memvec2a . y ; 207f += ablock . m22 [ i ][ 1 ][ 0 ] ; 208f += dm22 [ 3 ][ 0 ][ 1 ] ; 209f += m22 [ 2 ][ 1 ] . y ; 210f += nest . foo . n1 . a + nest . foo . n2 . b + nest . foo . n2 . c + nest . foo . n2 . d ; 211f += deepA [ i ] . d2 . d1 [ 2 ] . va [ 1 ] . x ; 212f += deepB [ 1 ] . d2 . d1 [ i ] . va [ 1 ] . x ; 213f += deepB [ i ] . d2 . d1 [ i ] . va [ 1 ] . x ; 214deep3 d = deepC [ 1 ] ; 215deep3 da [ 2 ] = deepD ; 216deep1 db = deepA [ i ] . d2 . d1 [ i ] ; 217} else 218f = ufDead3 ; 219 220f += arrBl [ 2 ] . foo + arrBl [ 0 ] . foo ; 221f += arrBl2 [ i ] . foo ; 222 223f += attributeFloat ; 224f += attributeFloat2 . x ; 225f += attributeFloat3 . x ; 226f += attributeFloat4 . x ; 227f += attributeMat4 [ 0 ][ 1 ] ; 228f += attributeFloatArray [ 2 ] ; 229f += buf1i . runtimeArray [ 3 ] ; 230f += buf2i . runtimeArray [ 3 ] . c ; 231f += buf3i . runtimeArray [ gl_InstanceID ] ; 232f += buf4i . runtimeArray [ gl_InstanceID ] . c ; 233 234N3 n = nest2 . a ; 235N1 b [ 4 ] = nest2 . b ; 236f += nest2 . c [ 1 ] . a ; 237f += nest2 . d [ gl_InstanceID ] . a ; 238 239f += t [ 0 ] . v [ 0 ] . position [ 0 ] ; 240f += t [ gl_InstanceID ] . v [ gl_InstanceID ] . position [ gl_InstanceID ] ; 241f += t [ gl_InstanceID ] . v [ gl_InstanceID ] . normal [ gl_InstanceID ] ; 242TriangleInfo tlocal [ 5 ] = t ; 243 244outval = f ; 245}