1 hlsl.array.flatten.frag
2 WARNING: AST will form illegal SPIR-V; need to transform to legalize
4 gl_FragCoord origin is upper left
6 0:17 Function Definition: TestFn1( ( temp 4-component vector of float)
7 0:17 Function Parameters:
9 0:18 Branch: Return with expression
10 0:18 texture ( temp 4-component vector of float)
11 0:18 Construct combined texture-sampler ( temp sampler1D)
12 0:? 'g_tex[1]' ( uniform texture1D)
13 0:? 'g_samp[1]' ( uniform sampler)
16 0:22 Function Definition: TestFn2(t11[3];p1[3]; ( temp 4-component vector of float)
17 0:22 Function Parameters:
18 0:22 'l_tex' ( in 3-element array of texture1D)
19 0:22 'l_samp' ( in 3-element array of sampler)
21 0:23 Branch: Return with expression
22 0:23 texture ( temp 4-component vector of float)
23 0:23 Construct combined texture-sampler ( temp sampler1D)
24 0:23 direct index ( temp texture1D)
25 0:23 'l_tex' ( in 3-element array of texture1D)
28 0:23 direct index ( temp sampler)
29 0:23 'l_samp' ( in 3-element array of sampler)
35 0:26 move second child to first child ( temp 5-element array of int)
36 0:26 'not_flattened_a' ( global 5-element array of int)
43 0:31 Function Definition: @main(struct-PS_OUTPUT-vf41; ( temp void)
44 0:31 Function Parameters:
45 0:31 'ps_output' ( out structure{ temp 4-component vector of float color})
49 0:33 move second child to first child ( temp sampler)
50 0:33 direct index ( temp sampler)
51 0:33 'local_sampler_array' ( temp 3-element array of sampler)
54 0:? 'g_samp[0]' ( uniform sampler)
55 0:33 move second child to first child ( temp sampler)
56 0:33 direct index ( temp sampler)
57 0:33 'local_sampler_array' ( temp 3-element array of sampler)
60 0:? 'g_samp[1]' ( uniform sampler)
61 0:33 move second child to first child ( temp sampler)
62 0:33 direct index ( temp sampler)
63 0:33 'local_sampler_array' ( temp 3-element array of sampler)
66 0:? 'g_samp[2]' ( uniform sampler)
69 0:34 move second child to first child ( temp texture1D)
70 0:34 direct index ( temp texture1D)
71 0:34 'local_texture_array' ( temp 3-element array of texture1D)
74 0:? 'g_tex[0]' ( uniform texture1D)
75 0:34 move second child to first child ( temp texture1D)
76 0:34 direct index ( temp texture1D)
77 0:34 'local_texture_array' ( temp 3-element array of texture1D)
80 0:? 'g_tex[1]' ( uniform texture1D)
81 0:34 move second child to first child ( temp texture1D)
82 0:34 direct index ( temp texture1D)
83 0:34 'local_texture_array' ( temp 3-element array of texture1D)
86 0:? 'g_tex[2]' ( uniform texture1D)
88 0:35 move second child to first child ( temp 4-element array of float)
89 0:35 'local_float_array' ( temp 4-element array of float)
90 0:35 g_floats: direct index for structure ( uniform 4-element array of float)
91 0:35 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit, uniform 4-element array of float g_floats})
94 0:37 move second child to first child ( temp 4-component vector of float)
95 0:37 color: direct index for structure ( temp 4-component vector of float)
96 0:37 'ps_output' ( out structure{ temp 4-component vector of float color})
99 0:37 add ( temp 4-component vector of float)
100 0:37 Function Call: TestFn1( ( temp 4-component vector of float)
101 0:37 Function Call: TestFn2(t11[3];p1[3]; ( temp 4-component vector of float)
102 0:37 Comma ( temp 3-element array of texture1D)
104 0:37 move second child to first child ( temp texture1D)
105 0:37 direct index ( temp texture1D)
106 0:37 'aggShadow' ( temp 3-element array of texture1D)
109 0:? 'g_tex[0]' ( uniform texture1D)
110 0:37 move second child to first child ( temp texture1D)
111 0:37 direct index ( temp texture1D)
112 0:37 'aggShadow' ( temp 3-element array of texture1D)
115 0:? 'g_tex[1]' ( uniform texture1D)
116 0:37 move second child to first child ( temp texture1D)
117 0:37 direct index ( temp texture1D)
118 0:37 'aggShadow' ( temp 3-element array of texture1D)
121 0:? 'g_tex[2]' ( uniform texture1D)
122 0:37 'aggShadow' ( temp 3-element array of texture1D)
123 0:37 Comma ( temp 3-element array of sampler)
125 0:37 move second child to first child ( temp sampler)
126 0:37 direct index ( temp sampler)
127 0:37 'aggShadow' ( temp 3-element array of sampler)
130 0:? 'g_samp[0]' ( uniform sampler)
131 0:37 move second child to first child ( temp sampler)
132 0:37 direct index ( temp sampler)
133 0:37 'aggShadow' ( temp 3-element array of sampler)
136 0:? 'g_samp[1]' ( uniform sampler)
137 0:37 move second child to first child ( temp sampler)
138 0:37 direct index ( temp sampler)
139 0:37 'aggShadow' ( temp 3-element array of sampler)
142 0:? 'g_samp[2]' ( uniform sampler)
143 0:37 'aggShadow' ( temp 3-element array of sampler)
144 0:31 Function Definition: main( ( temp void)
145 0:31 Function Parameters:
147 0:31 Function Call: @main(struct-PS_OUTPUT-vf41; ( temp void)
148 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color})
150 0:31 move second child to first child ( temp 4-component vector of float)
151 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float)
152 0:31 color: direct index for structure ( temp 4-component vector of float)
153 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color})
157 0:? 'g_tex[0]' ( uniform texture1D)
158 0:? 'g_tex[1]' ( uniform texture1D)
159 0:? 'g_tex[2]' ( uniform texture1D)
160 0:? 'g_tex_explicit[0]' (layout( binding=1) uniform texture1D)
161 0:? 'g_tex_explicit[1]' (layout( binding=2) uniform texture1D)
162 0:? 'g_tex_explicit[2]' (layout( binding=3) uniform texture1D)
163 0:? 'g_samp[0]' ( uniform sampler)
164 0:? 'g_samp[1]' ( uniform sampler)
165 0:? 'g_samp[2]' ( uniform sampler)
166 0:? 'g_samp_explicit[0]' (layout( binding=5) uniform sampler)
167 0:? 'g_samp_explicit[1]' (layout( binding=6) uniform sampler)
168 0:? 'g_samp_explicit[2]' (layout( binding=7) uniform sampler)
169 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit, uniform 4-element array of float g_floats})
170 0:? 'not_flattened_a' ( global 5-element array of int)
171 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float)
174 Linked fragment stage:
178 gl_FragCoord origin is upper left
180 0:17 Function Definition: TestFn1( ( temp 4-component vector of float)
181 0:17 Function Parameters:
183 0:18 Branch: Return with expression
184 0:18 texture ( temp 4-component vector of float)
185 0:18 Construct combined texture-sampler ( temp sampler1D)
186 0:? 'g_tex[1]' ( uniform texture1D)
187 0:? 'g_samp[1]' ( uniform sampler)
190 0:22 Function Definition: TestFn2(t11[3];p1[3]; ( temp 4-component vector of float)
191 0:22 Function Parameters:
192 0:22 'l_tex' ( in 3-element array of texture1D)
193 0:22 'l_samp' ( in 3-element array of sampler)
195 0:23 Branch: Return with expression
196 0:23 texture ( temp 4-component vector of float)
197 0:23 Construct combined texture-sampler ( temp sampler1D)
198 0:23 direct index ( temp texture1D)
199 0:23 'l_tex' ( in 3-element array of texture1D)
202 0:23 direct index ( temp sampler)
203 0:23 'l_samp' ( in 3-element array of sampler)
209 0:26 move second child to first child ( temp 5-element array of int)
210 0:26 'not_flattened_a' ( global 5-element array of int)
217 0:31 Function Definition: @main(struct-PS_OUTPUT-vf41; ( temp void)
218 0:31 Function Parameters:
219 0:31 'ps_output' ( out structure{ temp 4-component vector of float color})
223 0:33 move second child to first child ( temp sampler)
224 0:33 direct index ( temp sampler)
225 0:33 'local_sampler_array' ( temp 3-element array of sampler)
228 0:? 'g_samp[0]' ( uniform sampler)
229 0:33 move second child to first child ( temp sampler)
230 0:33 direct index ( temp sampler)
231 0:33 'local_sampler_array' ( temp 3-element array of sampler)
234 0:? 'g_samp[1]' ( uniform sampler)
235 0:33 move second child to first child ( temp sampler)
236 0:33 direct index ( temp sampler)
237 0:33 'local_sampler_array' ( temp 3-element array of sampler)
240 0:? 'g_samp[2]' ( uniform sampler)
243 0:34 move second child to first child ( temp texture1D)
244 0:34 direct index ( temp texture1D)
245 0:34 'local_texture_array' ( temp 3-element array of texture1D)
248 0:? 'g_tex[0]' ( uniform texture1D)
249 0:34 move second child to first child ( temp texture1D)
250 0:34 direct index ( temp texture1D)
251 0:34 'local_texture_array' ( temp 3-element array of texture1D)
254 0:? 'g_tex[1]' ( uniform texture1D)
255 0:34 move second child to first child ( temp texture1D)
256 0:34 direct index ( temp texture1D)
257 0:34 'local_texture_array' ( temp 3-element array of texture1D)
260 0:? 'g_tex[2]' ( uniform texture1D)
262 0:35 move second child to first child ( temp 4-element array of float)
263 0:35 'local_float_array' ( temp 4-element array of float)
264 0:35 g_floats: direct index for structure ( uniform 4-element array of float)
265 0:35 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit, uniform 4-element array of float g_floats})
268 0:37 move second child to first child ( temp 4-component vector of float)
269 0:37 color: direct index for structure ( temp 4-component vector of float)
270 0:37 'ps_output' ( out structure{ temp 4-component vector of float color})
273 0:37 add ( temp 4-component vector of float)
274 0:37 Function Call: TestFn1( ( temp 4-component vector of float)
275 0:37 Function Call: TestFn2(t11[3];p1[3]; ( temp 4-component vector of float)
276 0:37 Comma ( temp 3-element array of texture1D)
278 0:37 move second child to first child ( temp texture1D)
279 0:37 direct index ( temp texture1D)
280 0:37 'aggShadow' ( temp 3-element array of texture1D)
283 0:? 'g_tex[0]' ( uniform texture1D)
284 0:37 move second child to first child ( temp texture1D)
285 0:37 direct index ( temp texture1D)
286 0:37 'aggShadow' ( temp 3-element array of texture1D)
289 0:? 'g_tex[1]' ( uniform texture1D)
290 0:37 move second child to first child ( temp texture1D)
291 0:37 direct index ( temp texture1D)
292 0:37 'aggShadow' ( temp 3-element array of texture1D)
295 0:? 'g_tex[2]' ( uniform texture1D)
296 0:37 'aggShadow' ( temp 3-element array of texture1D)
297 0:37 Comma ( temp 3-element array of sampler)
299 0:37 move second child to first child ( temp sampler)
300 0:37 direct index ( temp sampler)
301 0:37 'aggShadow' ( temp 3-element array of sampler)
304 0:? 'g_samp[0]' ( uniform sampler)
305 0:37 move second child to first child ( temp sampler)
306 0:37 direct index ( temp sampler)
307 0:37 'aggShadow' ( temp 3-element array of sampler)
310 0:? 'g_samp[1]' ( uniform sampler)
311 0:37 move second child to first child ( temp sampler)
312 0:37 direct index ( temp sampler)
313 0:37 'aggShadow' ( temp 3-element array of sampler)
316 0:? 'g_samp[2]' ( uniform sampler)
317 0:37 'aggShadow' ( temp 3-element array of sampler)
318 0:31 Function Definition: main( ( temp void)
319 0:31 Function Parameters:
321 0:31 Function Call: @main(struct-PS_OUTPUT-vf41; ( temp void)
322 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color})
324 0:31 move second child to first child ( temp 4-component vector of float)
325 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float)
326 0:31 color: direct index for structure ( temp 4-component vector of float)
327 0:? 'ps_output' ( temp structure{ temp 4-component vector of float color})
331 0:? 'g_tex[0]' ( uniform texture1D)
332 0:? 'g_tex[1]' ( uniform texture1D)
333 0:? 'g_tex[2]' ( uniform texture1D)
334 0:? 'g_tex_explicit[0]' (layout( binding=1) uniform texture1D)
335 0:? 'g_tex_explicit[1]' (layout( binding=2) uniform texture1D)
336 0:? 'g_tex_explicit[2]' (layout( binding=3) uniform texture1D)
337 0:? 'g_samp[0]' ( uniform sampler)
338 0:? 'g_samp[1]' ( uniform sampler)
339 0:? 'g_samp[2]' ( uniform sampler)
340 0:? 'g_samp_explicit[0]' (layout( binding=5) uniform sampler)
341 0:? 'g_samp_explicit[1]' (layout( binding=6) uniform sampler)
342 0:? 'g_samp_explicit[2]' (layout( binding=7) uniform sampler)
343 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-element array of 3X3 matrix of float g_mats, layout( binding=10) uniform 4-element array of 3X3 matrix of float g_mats_explicit, uniform 4-element array of float g_floats})
344 0:? 'not_flattened_a' ( global 5-element array of int)
345 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float)
347 // Module Version 10000
348 // Generated by (magic number): 8000b
349 // Id's are bound by 143
353 1: ExtInstImport "GLSL.std.450"
354 MemoryModel Logical GLSL450
355 EntryPoint Fragment 4 "main" 134
356 ExecutionMode 4 OriginUpperLeft
360 Name 22 "TestFn2(t11[3];p1[3];"
364 MemberName 24(PS_OUTPUT) 0 "color"
365 Name 28 "@main(struct-PS_OUTPUT-vf41;"
367 Name 34 "not_flattened_a"
370 Name 63 "local_sampler_array"
373 Name 73 "local_texture_array"
376 Name 85 "local_float_array"
378 MemberName 91($Global) 0 "g_mats"
379 MemberName 91($Global) 1 "g_mats_explicit"
380 MemberName 91($Global) 2 "g_floats"
388 Name 134 "ps_output.color"
389 Name 137 "g_tex_explicit[0]"
390 Name 138 "g_tex_explicit[1]"
391 Name 139 "g_tex_explicit[2]"
392 Name 140 "g_samp_explicit[0]"
393 Name 141 "g_samp_explicit[1]"
394 Name 142 "g_samp_explicit[2]"
395 Decorate 42(g_tex[1]) DescriptorSet 0
396 Decorate 42(g_tex[1]) Binding 4
397 Decorate 45(g_samp[1]) DescriptorSet 0
398 Decorate 45(g_samp[1]) Binding 10
399 Decorate 65(g_samp[0]) DescriptorSet 0
400 Decorate 65(g_samp[0]) Binding 9
401 Decorate 70(g_samp[2]) DescriptorSet 0
402 Decorate 70(g_samp[2]) Binding 11
403 Decorate 74(g_tex[0]) DescriptorSet 0
404 Decorate 74(g_tex[0]) Binding 0
405 Decorate 79(g_tex[2]) DescriptorSet 0
406 Decorate 79(g_tex[2]) Binding 8
407 Decorate 88 ArrayStride 48
408 Decorate 89 ArrayStride 48
409 Decorate 90 ArrayStride 16
410 MemberDecorate 91($Global) 0 RowMajor
411 MemberDecorate 91($Global) 0 Offset 0
412 MemberDecorate 91($Global) 0 MatrixStride 16
413 MemberDecorate 91($Global) 1 RowMajor
414 MemberDecorate 91($Global) 1 Offset 192
415 MemberDecorate 91($Global) 1 MatrixStride 16
416 MemberDecorate 91($Global) 2 Offset 384
417 Decorate 91($Global) Block
418 Decorate 93 DescriptorSet 0
419 Decorate 93 Binding 12
420 Decorate 134(ps_output.color) Location 0
421 Decorate 137(g_tex_explicit[0]) DescriptorSet 0
422 Decorate 137(g_tex_explicit[0]) Binding 1
423 Decorate 138(g_tex_explicit[1]) DescriptorSet 0
424 Decorate 138(g_tex_explicit[1]) Binding 2
425 Decorate 139(g_tex_explicit[2]) DescriptorSet 0
426 Decorate 139(g_tex_explicit[2]) Binding 3
427 Decorate 140(g_samp_explicit[0]) DescriptorSet 0
428 Decorate 140(g_samp_explicit[0]) Binding 5
429 Decorate 141(g_samp_explicit[1]) DescriptorSet 0
430 Decorate 141(g_samp_explicit[1]) Binding 6
431 Decorate 142(g_samp_explicit[2]) DescriptorSet 0
432 Decorate 142(g_samp_explicit[2]) Binding 7
436 7: TypeVector 6(float) 4
437 8: TypeFunction 7(fvec4)
438 11: TypeImage 6(float) 1D sampled format:Unknown
440 13: 12(int) Constant 3
442 15: TypePointer Function 14
445 18: TypePointer Function 17
446 19: TypeFunction 7(fvec4) 15(ptr) 18(ptr)
447 24(PS_OUTPUT): TypeStruct 7(fvec4)
448 25: TypePointer Function 24(PS_OUTPUT)
449 26: TypeFunction 2 25(ptr)
451 31: 12(int) Constant 5
452 32: TypeArray 30(int) 31
453 33: TypePointer Private 32
454 34(not_flattened_a): 33(ptr) Variable Private
455 35: 30(int) Constant 1
456 36: 30(int) Constant 2
457 37: 30(int) Constant 3
458 38: 30(int) Constant 4
459 39: 30(int) Constant 5
460 40: 32 ConstantComposite 35 36 37 38 39
461 41: TypePointer UniformConstant 11
462 42(g_tex[1]): 41(ptr) Variable UniformConstant
463 44: TypePointer UniformConstant 16
464 45(g_samp[1]): 44(ptr) Variable UniformConstant
465 47: TypeSampledImage 11
466 49: 6(float) Constant 1045220557
467 53: TypePointer Function 11
468 56: TypePointer Function 16
469 64: 30(int) Constant 0
470 65(g_samp[0]): 44(ptr) Variable UniformConstant
471 70(g_samp[2]): 44(ptr) Variable UniformConstant
472 74(g_tex[0]): 41(ptr) Variable UniformConstant
473 79(g_tex[2]): 41(ptr) Variable UniformConstant
474 82: 12(int) Constant 4
475 83: TypeArray 6(float) 82
476 84: TypePointer Function 83
477 86: TypeVector 6(float) 3
478 87: TypeMatrix 86(fvec3) 3
481 90: TypeArray 6(float) 82
482 91($Global): TypeStruct 88 89 90
483 92: TypePointer Uniform 91($Global)
484 93: 92(ptr) Variable Uniform
485 94: TypePointer Uniform 90
486 98: TypePointer Function 6(float)
487 127: TypePointer Function 7(fvec4)
488 133: TypePointer Output 7(fvec4)
489 134(ps_output.color): 133(ptr) Variable Output
490 137(g_tex_explicit[0]): 41(ptr) Variable UniformConstant
491 138(g_tex_explicit[1]): 41(ptr) Variable UniformConstant
492 139(g_tex_explicit[2]): 41(ptr) Variable UniformConstant
493 140(g_samp_explicit[0]): 44(ptr) Variable UniformConstant
494 141(g_samp_explicit[1]): 44(ptr) Variable UniformConstant
495 142(g_samp_explicit[2]): 44(ptr) Variable UniformConstant
496 4(main): 2 Function None 3
498 129(ps_output): 25(ptr) Variable Function
499 130(param): 25(ptr) Variable Function
500 Store 34(not_flattened_a) 40
501 131: 2 FunctionCall 28(@main(struct-PS_OUTPUT-vf41;) 130(param)
502 132:24(PS_OUTPUT) Load 130(param)
503 Store 129(ps_output) 132
504 135: 127(ptr) AccessChain 129(ps_output) 64
505 136: 7(fvec4) Load 135
506 Store 134(ps_output.color) 136
509 9(TestFn1(): 7(fvec4) Function None 8
511 43: 11 Load 42(g_tex[1])
512 46: 16 Load 45(g_samp[1])
513 48: 47 SampledImage 43 46
514 50: 7(fvec4) ImageSampleImplicitLod 48 49
517 22(TestFn2(t11[3];p1[3];): 7(fvec4) Function None 19
518 20(l_tex): 15(ptr) FunctionParameter
519 21(l_samp): 18(ptr) FunctionParameter
521 54: 53(ptr) AccessChain 20(l_tex) 36
523 57: 56(ptr) AccessChain 21(l_samp) 36
525 59: 47 SampledImage 55 58
526 60: 7(fvec4) ImageSampleImplicitLod 59 49
529 28(@main(struct-PS_OUTPUT-vf41;): 2 Function None 26
530 27(ps_output): 25(ptr) FunctionParameter
532 63(local_sampler_array): 18(ptr) Variable Function
533 73(local_texture_array): 15(ptr) Variable Function
534 85(local_float_array): 84(ptr) Variable Function
535 107(aggShadow): 15(ptr) Variable Function
536 114(aggShadow): 18(ptr) Variable Function
537 121(param): 15(ptr) Variable Function
538 123(param): 18(ptr) Variable Function
539 66: 16 Load 65(g_samp[0])
540 67: 56(ptr) AccessChain 63(local_sampler_array) 64
542 68: 16 Load 45(g_samp[1])
543 69: 56(ptr) AccessChain 63(local_sampler_array) 35
545 71: 16 Load 70(g_samp[2])
546 72: 56(ptr) AccessChain 63(local_sampler_array) 36
548 75: 11 Load 74(g_tex[0])
549 76: 53(ptr) AccessChain 73(local_texture_array) 64
551 77: 11 Load 42(g_tex[1])
552 78: 53(ptr) AccessChain 73(local_texture_array) 35
554 80: 11 Load 79(g_tex[2])
555 81: 53(ptr) AccessChain 73(local_texture_array) 36
557 95: 94(ptr) AccessChain 93 36
559 97: 6(float) CompositeExtract 96 0
560 99: 98(ptr) AccessChain 85(local_float_array) 64
562 100: 6(float) CompositeExtract 96 1
563 101: 98(ptr) AccessChain 85(local_float_array) 35
565 102: 6(float) CompositeExtract 96 2
566 103: 98(ptr) AccessChain 85(local_float_array) 36
568 104: 6(float) CompositeExtract 96 3
569 105: 98(ptr) AccessChain 85(local_float_array) 37
571 106: 7(fvec4) FunctionCall 9(TestFn1()
572 108: 11 Load 74(g_tex[0])
573 109: 53(ptr) AccessChain 107(aggShadow) 64
575 110: 11 Load 42(g_tex[1])
576 111: 53(ptr) AccessChain 107(aggShadow) 35
578 112: 11 Load 79(g_tex[2])
579 113: 53(ptr) AccessChain 107(aggShadow) 36
581 115: 16 Load 65(g_samp[0])
582 116: 56(ptr) AccessChain 114(aggShadow) 64
584 117: 16 Load 45(g_samp[1])
585 118: 56(ptr) AccessChain 114(aggShadow) 35
587 119: 16 Load 70(g_samp[2])
588 120: 56(ptr) AccessChain 114(aggShadow) 36
590 122: 14 Load 107(aggShadow)
592 124: 17 Load 114(aggShadow)
594 125: 7(fvec4) FunctionCall 22(TestFn2(t11[3];p1[3];) 121(param) 123(param)
595 126: 7(fvec4) FAdd 106 125
596 128: 127(ptr) AccessChain 27(ps_output) 64