97e57b164fd6a458c2d251cd145c7b5d389345d6
[platform/upstream/glslang.git] / Test / baseResults / hlsl.structarray.flatten.frag.out
1 hlsl.structarray.flatten.frag
2 Shader version: 500
3 gl_FragCoord origin is upper left
4 0:? Sequence
5 0:23  Function Definition: @main(struct-PS_OUTPUT-vf41; ( temp void)
6 0:23    Function Parameters: 
7 0:23      'ps_output' ( out structure{ temp 4-component vector of float color})
8 0:?     Sequence
9 0:24      move second child to first child ( temp 4-component vector of float)
10 0:24        color: direct index for structure ( temp 4-component vector of float)
11 0:24          'ps_output' ( out structure{ temp 4-component vector of float color})
12 0:24          Constant:
13 0:24            0 (const int)
14 0:26        add ( temp 4-component vector of float)
15 0:25          add ( temp 4-component vector of float)
16 0:25            texture ( temp 4-component vector of float)
17 0:25              Construct combined texture-sampler ( temp sampler1D)
18 0:?                 'g_texdata.tex' ( uniform texture1D)
19 0:?                 'g_texdata.samp' ( uniform sampler)
20 0:25              Constant:
21 0:25                0.500000
22 0:26            texture ( temp 4-component vector of float)
23 0:26              Construct combined texture-sampler ( temp sampler1D)
24 0:?                 'g_texdata_array[1].tex' ( uniform texture1D)
25 0:?                 'g_texdata_array[1].samp' ( uniform sampler)
26 0:26              Constant:
27 0:26                0.400000
28 0:27          texture ( temp 4-component vector of float)
29 0:27            Construct combined texture-sampler ( temp sampler1D)
30 0:27              direct index ( temp texture1D)
31 0:?                 'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D)
32 0:27                Constant:
33 0:27                  0 (const int)
34 0:27              direct index ( temp sampler)
35 0:?                 'g_texdata_array2[1].samp' ( uniform 2-element array of sampler)
36 0:27                Constant:
37 0:27                  0 (const int)
38 0:27            Constant:
39 0:27              0.300000
40 0:23  Function Definition: main( ( temp void)
41 0:23    Function Parameters: 
42 0:?     Sequence
43 0:23      Function Call: @main(struct-PS_OUTPUT-vf41; ( temp void)
44 0:?         'ps_output' ( temp structure{ temp 4-component vector of float color})
45 0:23      Sequence
46 0:23        move second child to first child ( temp 4-component vector of float)
47 0:?           'ps_output.color' (layout( location=0) out 4-component vector of float)
48 0:23          color: direct index for structure ( temp 4-component vector of float)
49 0:?             'ps_output' ( temp structure{ temp 4-component vector of float color})
50 0:23            Constant:
51 0:23              0 (const int)
52 0:?   Linker Objects
53 0:?     'g_samp' ( uniform sampler)
54 0:?     'g_tex' ( uniform texture1D)
55 0:?     'g_texdata.samp' ( uniform sampler)
56 0:?     'g_texdata.tex' ( uniform texture1D)
57 0:?     'g_texdata.nonopaque_thing' ( uniform int)
58 0:?     'g_texdata_array[0].samp' ( uniform sampler)
59 0:?     'g_texdata_array[0].tex' ( uniform texture1D)
60 0:?     'g_texdata_array[0].nonopaque_thing' ( uniform int)
61 0:?     'g_texdata_array[1].samp' ( uniform sampler)
62 0:?     'g_texdata_array[1].tex' ( uniform texture1D)
63 0:?     'g_texdata_array[1].nonopaque_thing' ( uniform int)
64 0:?     'g_texdata_array[2].samp' ( uniform sampler)
65 0:?     'g_texdata_array[2].tex' ( uniform texture1D)
66 0:?     'g_texdata_array[2].nonopaque_thing' ( uniform int)
67 0:?     'g_texdata_array2[0].samp' ( uniform 2-element array of sampler)
68 0:?     'g_texdata_array2[0].tex' ( uniform 2-element array of texture1D)
69 0:?     'g_texdata_array2[0].nonopaque_thing' ( uniform int)
70 0:?     'g_texdata_array2[1].samp' ( uniform 2-element array of sampler)
71 0:?     'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D)
72 0:?     'g_texdata_array2[1].nonopaque_thing' ( uniform int)
73 0:?     'g_texdata_array2[2].samp' ( uniform 2-element array of sampler)
74 0:?     'g_texdata_array2[2].tex' ( uniform 2-element array of texture1D)
75 0:?     'g_texdata_array2[2].nonopaque_thing' ( uniform int)
76 0:?     'ps_output.color' (layout( location=0) out 4-component vector of float)
77
78
79 Linked fragment stage:
80
81
82 Shader version: 500
83 gl_FragCoord origin is upper left
84 0:? Sequence
85 0:23  Function Definition: @main(struct-PS_OUTPUT-vf41; ( temp void)
86 0:23    Function Parameters: 
87 0:23      'ps_output' ( out structure{ temp 4-component vector of float color})
88 0:?     Sequence
89 0:24      move second child to first child ( temp 4-component vector of float)
90 0:24        color: direct index for structure ( temp 4-component vector of float)
91 0:24          'ps_output' ( out structure{ temp 4-component vector of float color})
92 0:24          Constant:
93 0:24            0 (const int)
94 0:26        add ( temp 4-component vector of float)
95 0:25          add ( temp 4-component vector of float)
96 0:25            texture ( temp 4-component vector of float)
97 0:25              Construct combined texture-sampler ( temp sampler1D)
98 0:?                 'g_texdata.tex' ( uniform texture1D)
99 0:?                 'g_texdata.samp' ( uniform sampler)
100 0:25              Constant:
101 0:25                0.500000
102 0:26            texture ( temp 4-component vector of float)
103 0:26              Construct combined texture-sampler ( temp sampler1D)
104 0:?                 'g_texdata_array[1].tex' ( uniform texture1D)
105 0:?                 'g_texdata_array[1].samp' ( uniform sampler)
106 0:26              Constant:
107 0:26                0.400000
108 0:27          texture ( temp 4-component vector of float)
109 0:27            Construct combined texture-sampler ( temp sampler1D)
110 0:27              direct index ( temp texture1D)
111 0:?                 'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D)
112 0:27                Constant:
113 0:27                  0 (const int)
114 0:27              direct index ( temp sampler)
115 0:?                 'g_texdata_array2[1].samp' ( uniform 2-element array of sampler)
116 0:27                Constant:
117 0:27                  0 (const int)
118 0:27            Constant:
119 0:27              0.300000
120 0:23  Function Definition: main( ( temp void)
121 0:23    Function Parameters: 
122 0:?     Sequence
123 0:23      Function Call: @main(struct-PS_OUTPUT-vf41; ( temp void)
124 0:?         'ps_output' ( temp structure{ temp 4-component vector of float color})
125 0:23      Sequence
126 0:23        move second child to first child ( temp 4-component vector of float)
127 0:?           'ps_output.color' (layout( location=0) out 4-component vector of float)
128 0:23          color: direct index for structure ( temp 4-component vector of float)
129 0:?             'ps_output' ( temp structure{ temp 4-component vector of float color})
130 0:23            Constant:
131 0:23              0 (const int)
132 0:?   Linker Objects
133 0:?     'g_samp' ( uniform sampler)
134 0:?     'g_tex' ( uniform texture1D)
135 0:?     'g_texdata.samp' ( uniform sampler)
136 0:?     'g_texdata.tex' ( uniform texture1D)
137 0:?     'g_texdata.nonopaque_thing' ( uniform int)
138 0:?     'g_texdata_array[0].samp' ( uniform sampler)
139 0:?     'g_texdata_array[0].tex' ( uniform texture1D)
140 0:?     'g_texdata_array[0].nonopaque_thing' ( uniform int)
141 0:?     'g_texdata_array[1].samp' ( uniform sampler)
142 0:?     'g_texdata_array[1].tex' ( uniform texture1D)
143 0:?     'g_texdata_array[1].nonopaque_thing' ( uniform int)
144 0:?     'g_texdata_array[2].samp' ( uniform sampler)
145 0:?     'g_texdata_array[2].tex' ( uniform texture1D)
146 0:?     'g_texdata_array[2].nonopaque_thing' ( uniform int)
147 0:?     'g_texdata_array2[0].samp' ( uniform 2-element array of sampler)
148 0:?     'g_texdata_array2[0].tex' ( uniform 2-element array of texture1D)
149 0:?     'g_texdata_array2[0].nonopaque_thing' ( uniform int)
150 0:?     'g_texdata_array2[1].samp' ( uniform 2-element array of sampler)
151 0:?     'g_texdata_array2[1].tex' ( uniform 2-element array of texture1D)
152 0:?     'g_texdata_array2[1].nonopaque_thing' ( uniform int)
153 0:?     'g_texdata_array2[2].samp' ( uniform 2-element array of sampler)
154 0:?     'g_texdata_array2[2].tex' ( uniform 2-element array of texture1D)
155 0:?     'g_texdata_array2[2].nonopaque_thing' ( uniform int)
156 0:?     'ps_output.color' (layout( location=0) out 4-component vector of float)
157
158 Validation failed
159 // Module Version 10000
160 // Generated by (magic number): 8000a
161 // Id's are bound by 80
162
163                               Capability Shader
164                               Capability Sampled1D
165                1:             ExtInstImport  "GLSL.std.450"
166                               MemoryModel Logical GLSL450
167                               EntryPoint Fragment 4  "main" 59
168                               ExecutionMode 4 OriginUpperLeft
169                               Source HLSL 500
170                               Name 4  "main"
171                               Name 8  "PS_OUTPUT"
172                               MemberName 8(PS_OUTPUT) 0  "color"
173                               Name 12  "@main(struct-PS_OUTPUT-vf41;"
174                               Name 11  "ps_output"
175                               Name 18  "g_texdata.tex"
176                               Name 22  "g_texdata.samp"
177                               Name 28  "g_texdata_array[1].tex"
178                               Name 30  "g_texdata_array[1].samp"
179                               Name 40  "g_texdata_array2[1].tex"
180                               Name 45  "g_texdata_array2[1].samp"
181                               Name 54  "ps_output"
182                               Name 55  "param"
183                               Name 59  "ps_output.color"
184                               Name 62  "g_samp"
185                               Name 63  "g_tex"
186                               Name 65  "g_texdata.nonopaque_thing"
187                               Name 66  "g_texdata_array[0].samp"
188                               Name 67  "g_texdata_array[0].tex"
189                               Name 68  "g_texdata_array[0].nonopaque_thing"
190                               Name 69  "g_texdata_array[1].nonopaque_thing"
191                               Name 70  "g_texdata_array[2].samp"
192                               Name 71  "g_texdata_array[2].tex"
193                               Name 72  "g_texdata_array[2].nonopaque_thing"
194                               Name 73  "g_texdata_array2[0].samp"
195                               Name 74  "g_texdata_array2[0].tex"
196                               Name 75  "g_texdata_array2[0].nonopaque_thing"
197                               Name 76  "g_texdata_array2[1].nonopaque_thing"
198                               Name 77  "g_texdata_array2[2].samp"
199                               Name 78  "g_texdata_array2[2].tex"
200                               Name 79  "g_texdata_array2[2].nonopaque_thing"
201                               Decorate 18(g_texdata.tex) DescriptorSet 0
202                               Decorate 18(g_texdata.tex) Binding 1
203                               Decorate 22(g_texdata.samp) DescriptorSet 0
204                               Decorate 22(g_texdata.samp) Binding 0
205                               Decorate 28(g_texdata_array[1].tex) DescriptorSet 0
206                               Decorate 28(g_texdata_array[1].tex) Binding 3
207                               Decorate 30(g_texdata_array[1].samp) DescriptorSet 0
208                               Decorate 30(g_texdata_array[1].samp) Binding 2
209                               Decorate 40(g_texdata_array2[1].tex) DescriptorSet 0
210                               Decorate 40(g_texdata_array2[1].tex) Binding 5
211                               Decorate 45(g_texdata_array2[1].samp) DescriptorSet 0
212                               Decorate 45(g_texdata_array2[1].samp) Binding 4
213                               Decorate 59(ps_output.color) Location 0
214                               Decorate 62(g_samp) DescriptorSet 0
215                               Decorate 62(g_samp) Binding 0
216                               Decorate 63(g_tex) DescriptorSet 0
217                               Decorate 63(g_tex) Binding 0
218                               Decorate 65(g_texdata.nonopaque_thing) Location 0
219                               Decorate 65(g_texdata.nonopaque_thing) DescriptorSet 0
220                               Decorate 66(g_texdata_array[0].samp) DescriptorSet 0
221                               Decorate 66(g_texdata_array[0].samp) Binding 0
222                               Decorate 67(g_texdata_array[0].tex) DescriptorSet 0
223                               Decorate 67(g_texdata_array[0].tex) Binding 0
224                               Decorate 68(g_texdata_array[0].nonopaque_thing) Location 1
225                               Decorate 68(g_texdata_array[0].nonopaque_thing) DescriptorSet 0
226                               Decorate 69(g_texdata_array[1].nonopaque_thing) Location 2
227                               Decorate 69(g_texdata_array[1].nonopaque_thing) DescriptorSet 0
228                               Decorate 70(g_texdata_array[2].samp) DescriptorSet 0
229                               Decorate 70(g_texdata_array[2].samp) Binding 0
230                               Decorate 71(g_texdata_array[2].tex) DescriptorSet 0
231                               Decorate 71(g_texdata_array[2].tex) Binding 0
232                               Decorate 72(g_texdata_array[2].nonopaque_thing) Location 3
233                               Decorate 72(g_texdata_array[2].nonopaque_thing) DescriptorSet 0
234                               Decorate 73(g_texdata_array2[0].samp) DescriptorSet 0
235                               Decorate 73(g_texdata_array2[0].samp) Binding 0
236                               Decorate 74(g_texdata_array2[0].tex) DescriptorSet 0
237                               Decorate 74(g_texdata_array2[0].tex) Binding 0
238                               Decorate 75(g_texdata_array2[0].nonopaque_thing) Location 4
239                               Decorate 75(g_texdata_array2[0].nonopaque_thing) DescriptorSet 0
240                               Decorate 76(g_texdata_array2[1].nonopaque_thing) Location 5
241                               Decorate 76(g_texdata_array2[1].nonopaque_thing) DescriptorSet 0
242                               Decorate 77(g_texdata_array2[2].samp) DescriptorSet 0
243                               Decorate 77(g_texdata_array2[2].samp) Binding 0
244                               Decorate 78(g_texdata_array2[2].tex) DescriptorSet 0
245                               Decorate 78(g_texdata_array2[2].tex) Binding 0
246                               Decorate 79(g_texdata_array2[2].nonopaque_thing) Location 6
247                               Decorate 79(g_texdata_array2[2].nonopaque_thing) DescriptorSet 0
248                2:             TypeVoid
249                3:             TypeFunction 2
250                6:             TypeFloat 32
251                7:             TypeVector 6(float) 4
252     8(PS_OUTPUT):             TypeStruct 7(fvec4)
253                9:             TypePointer Function 8(PS_OUTPUT)
254               10:             TypeFunction 2 9(ptr)
255               14:             TypeInt 32 1
256               15:     14(int) Constant 0
257               16:             TypeImage 6(float) 1D sampled format:Unknown
258               17:             TypePointer UniformConstant 16
259 18(g_texdata.tex):     17(ptr) Variable UniformConstant
260               20:             TypeSampler
261               21:             TypePointer UniformConstant 20
262 22(g_texdata.samp):     21(ptr) Variable UniformConstant
263               24:             TypeSampledImage 16
264               26:    6(float) Constant 1056964608
265 28(g_texdata_array[1].tex):     17(ptr) Variable UniformConstant
266 30(g_texdata_array[1].samp):     21(ptr) Variable UniformConstant
267               33:    6(float) Constant 1053609165
268               36:             TypeInt 32 0
269               37:     36(int) Constant 2
270               38:             TypeArray 16 37
271               39:             TypePointer UniformConstant 38
272 40(g_texdata_array2[1].tex):     39(ptr) Variable UniformConstant
273               43:             TypeArray 20 37
274               44:             TypePointer UniformConstant 43
275 45(g_texdata_array2[1].samp):     44(ptr) Variable UniformConstant
276               49:    6(float) Constant 1050253722
277               52:             TypePointer Function 7(fvec4)
278               58:             TypePointer Output 7(fvec4)
279 59(ps_output.color):     58(ptr) Variable Output
280       62(g_samp):     21(ptr) Variable UniformConstant
281        63(g_tex):     17(ptr) Variable UniformConstant
282               64:             TypePointer UniformConstant 14(int)
283 65(g_texdata.nonopaque_thing):     64(ptr) Variable UniformConstant
284 66(g_texdata_array[0].samp):     21(ptr) Variable UniformConstant
285 67(g_texdata_array[0].tex):     17(ptr) Variable UniformConstant
286 68(g_texdata_array[0].nonopaque_thing):     64(ptr) Variable UniformConstant
287 69(g_texdata_array[1].nonopaque_thing):     64(ptr) Variable UniformConstant
288 70(g_texdata_array[2].samp):     21(ptr) Variable UniformConstant
289 71(g_texdata_array[2].tex):     17(ptr) Variable UniformConstant
290 72(g_texdata_array[2].nonopaque_thing):     64(ptr) Variable UniformConstant
291 73(g_texdata_array2[0].samp):     44(ptr) Variable UniformConstant
292 74(g_texdata_array2[0].tex):     39(ptr) Variable UniformConstant
293 75(g_texdata_array2[0].nonopaque_thing):     64(ptr) Variable UniformConstant
294 76(g_texdata_array2[1].nonopaque_thing):     64(ptr) Variable UniformConstant
295 77(g_texdata_array2[2].samp):     44(ptr) Variable UniformConstant
296 78(g_texdata_array2[2].tex):     39(ptr) Variable UniformConstant
297 79(g_texdata_array2[2].nonopaque_thing):     64(ptr) Variable UniformConstant
298          4(main):           2 Function None 3
299                5:             Label
300    54(ps_output):      9(ptr) Variable Function
301        55(param):      9(ptr) Variable Function
302               56:           2 FunctionCall 12(@main(struct-PS_OUTPUT-vf41;) 55(param)
303               57:8(PS_OUTPUT) Load 55(param)
304                               Store 54(ps_output) 57
305               60:     52(ptr) AccessChain 54(ps_output) 15
306               61:    7(fvec4) Load 60
307                               Store 59(ps_output.color) 61
308                               Return
309                               FunctionEnd
310 12(@main(struct-PS_OUTPUT-vf41;):           2 Function None 10
311    11(ps_output):      9(ptr) FunctionParameter
312               13:             Label
313               19:          16 Load 18(g_texdata.tex)
314               23:          20 Load 22(g_texdata.samp)
315               25:          24 SampledImage 19 23
316               27:    7(fvec4) ImageSampleImplicitLod 25 26
317               29:          16 Load 28(g_texdata_array[1].tex)
318               31:          20 Load 30(g_texdata_array[1].samp)
319               32:          24 SampledImage 29 31
320               34:    7(fvec4) ImageSampleImplicitLod 32 33
321               35:    7(fvec4) FAdd 27 34
322               41:     17(ptr) AccessChain 40(g_texdata_array2[1].tex) 15
323               42:          16 Load 41
324               46:     21(ptr) AccessChain 45(g_texdata_array2[1].samp) 15
325               47:          20 Load 46
326               48:          24 SampledImage 42 47
327               50:    7(fvec4) ImageSampleImplicitLod 48 49
328               51:    7(fvec4) FAdd 35 50
329               53:     52(ptr) AccessChain 11(ps_output) 15
330                               Store 53 51
331                               Return
332                               FunctionEnd