xref: /aosp_15_r20/external/angle/third_party/glslang/src/Test/baseResults/hlsl.w-recip2.frag.out (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1hlsl.w-recip2.frag
2Shader version: 500
3gl_FragCoord origin is upper left
40:? Sequence
50:13  Function Definition: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
60:13    Function Parameters:
70:13      'VSOut' ( in structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
80:?     Sequence
90:14      Test condition and select ( temp void)
100:14        Condition
110:14        Compare Less Than ( temp bool)
120:14          direct index ( temp float)
130:14            PositionPS: direct index for structure ( temp 4-component vector of float)
140:14              'VSOut' ( in structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
150:14              Constant:
160:14                0 (const int)
170:14            Constant:
180:14              0 (const int)
190:14          Constant:
200:14            400.000000
210:14        true case
220:15        Branch: Return with expression
230:15          AmbientColor: direct index for structure ( uniform 4-component vector of float)
240:15            'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform 4-component vector of float AmbientColor2})
250:15            Constant:
260:15              0 (const uint)
270:14        false case
280:17        Branch: Return with expression
290:17          AmbientColor2: direct index for structure ( uniform 4-component vector of float)
300:17            'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform 4-component vector of float AmbientColor2})
310:17            Constant:
320:17              1 (const uint)
330:13  Function Definition: main( ( temp void)
340:13    Function Parameters:
350:?     Sequence
360:13      Sequence
370:13        Sequence
380:13          move second child to first child ( temp 4-component vector of float)
390:13            '@fragcoord' ( temp 4-component vector of float)
400:?             'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
410:13          move second child to first child ( temp float)
420:13            direct index ( in float FragCoord)
430:13              '@fragcoord' ( temp 4-component vector of float)
440:13              Constant:
450:13                3 (const int)
460:13            divide ( temp float)
470:13              Constant:
480:13                1.000000
490:13              direct index ( in float FragCoord)
500:13                '@fragcoord' ( temp 4-component vector of float)
510:13                Constant:
520:13                  3 (const int)
530:13          move second child to first child ( temp 4-component vector of float)
540:13            PositionPS: direct index for structure ( temp 4-component vector of float)
550:?               'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
560:13              Constant:
570:13                0 (const int)
580:13            '@fragcoord' ( temp 4-component vector of float)
590:13        move second child to first child ( temp 3-component vector of float)
600:13          PosInLightViewSpace: direct index for structure ( temp 3-component vector of float)
610:?             'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
620:13            Constant:
630:13              1 (const int)
640:?           'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
650:13        move second child to first child ( temp 3-component vector of float)
660:13          NormalWS: direct index for structure ( temp 3-component vector of float)
670:?             'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
680:13            Constant:
690:13              2 (const int)
700:?           'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
710:13        move second child to first child ( temp 2-component vector of float)
720:13          TexCoord: direct index for structure ( temp 2-component vector of float)
730:?             'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
740:13            Constant:
750:13              3 (const int)
760:?           'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
770:13      move second child to first child ( temp 4-component vector of float)
780:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
790:13        Function Call: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
800:?           'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
810:?   Linker Objects
820:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform 4-component vector of float AmbientColor2})
830:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
840:?     'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
850:?     'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
860:?     'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
870:?     'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
88
89
90Linked fragment stage:
91
92
93Shader version: 500
94gl_FragCoord origin is upper left
950:? Sequence
960:13  Function Definition: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
970:13    Function Parameters:
980:13      'VSOut' ( in structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
990:?     Sequence
1000:14      Test condition and select ( temp void)
1010:14        Condition
1020:14        Compare Less Than ( temp bool)
1030:14          direct index ( temp float)
1040:14            PositionPS: direct index for structure ( temp 4-component vector of float)
1050:14              'VSOut' ( in structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
1060:14              Constant:
1070:14                0 (const int)
1080:14            Constant:
1090:14              0 (const int)
1100:14          Constant:
1110:14            400.000000
1120:14        true case
1130:15        Branch: Return with expression
1140:15          AmbientColor: direct index for structure ( uniform 4-component vector of float)
1150:15            'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform 4-component vector of float AmbientColor2})
1160:15            Constant:
1170:15              0 (const uint)
1180:14        false case
1190:17        Branch: Return with expression
1200:17          AmbientColor2: direct index for structure ( uniform 4-component vector of float)
1210:17            'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform 4-component vector of float AmbientColor2})
1220:17            Constant:
1230:17              1 (const uint)
1240:13  Function Definition: main( ( temp void)
1250:13    Function Parameters:
1260:?     Sequence
1270:13      Sequence
1280:13        Sequence
1290:13          move second child to first child ( temp 4-component vector of float)
1300:13            '@fragcoord' ( temp 4-component vector of float)
1310:?             'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
1320:13          move second child to first child ( temp float)
1330:13            direct index ( in float FragCoord)
1340:13              '@fragcoord' ( temp 4-component vector of float)
1350:13              Constant:
1360:13                3 (const int)
1370:13            divide ( temp float)
1380:13              Constant:
1390:13                1.000000
1400:13              direct index ( in float FragCoord)
1410:13                '@fragcoord' ( temp 4-component vector of float)
1420:13                Constant:
1430:13                  3 (const int)
1440:13          move second child to first child ( temp 4-component vector of float)
1450:13            PositionPS: direct index for structure ( temp 4-component vector of float)
1460:?               'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
1470:13              Constant:
1480:13                0 (const int)
1490:13            '@fragcoord' ( temp 4-component vector of float)
1500:13        move second child to first child ( temp 3-component vector of float)
1510:13          PosInLightViewSpace: direct index for structure ( temp 3-component vector of float)
1520:?             'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
1530:13            Constant:
1540:13              1 (const int)
1550:?           'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
1560:13        move second child to first child ( temp 3-component vector of float)
1570:13          NormalWS: direct index for structure ( temp 3-component vector of float)
1580:?             'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
1590:13            Constant:
1600:13              2 (const int)
1610:?           'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
1620:13        move second child to first child ( temp 2-component vector of float)
1630:13          TexCoord: direct index for structure ( temp 2-component vector of float)
1640:?             'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
1650:13            Constant:
1660:13              3 (const int)
1670:?           'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
1680:13      move second child to first child ( temp 4-component vector of float)
1690:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
1700:13        Function Call: @main(struct-VSOutput-vf4-vf3-vf3-vf21; ( temp 4-component vector of float)
1710:?           'VSOut' ( temp structure{ temp 4-component vector of float PositionPS,  temp 3-component vector of float PosInLightViewSpace,  temp 3-component vector of float NormalWS,  temp 2-component vector of float TexCoord})
1720:?   Linker Objects
1730:?     'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor,  uniform 4-component vector of float AmbientColor2})
1740:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
1750:?     'VSOut.PositionPS' ( in 4-component vector of float FragCoord)
1760:?     'VSOut.PosInLightViewSpace' (layout( location=0) in 3-component vector of float)
1770:?     'VSOut.NormalWS' (layout( location=1) in 3-component vector of float)
1780:?     'VSOut.TexCoord' (layout( location=2) in 2-component vector of float)
179
180// Module Version 10000
181// Generated by (magic number): 8000b
182// Id's are bound by 75
183
184                              Capability Shader
185               1:             ExtInstImport  "GLSL.std.450"
186                              MemoryModel Logical GLSL450
187                              EntryPoint Fragment 4  "main" 44 56 61 66 71
188                              ExecutionMode 4 OriginUpperLeft
189                              Source HLSL 500
190                              Name 4  "main"
191                              Name 10  "VSOutput"
192                              MemberName 10(VSOutput) 0  "PositionPS"
193                              MemberName 10(VSOutput) 1  "PosInLightViewSpace"
194                              MemberName 10(VSOutput) 2  "NormalWS"
195                              MemberName 10(VSOutput) 3  "TexCoord"
196                              Name 14  "@main(struct-VSOutput-vf4-vf3-vf3-vf21;"
197                              Name 13  "VSOut"
198                              Name 28  "$Global"
199                              MemberName 28($Global) 0  "AmbientColor"
200                              MemberName 28($Global) 1  "AmbientColor2"
201                              Name 30  ""
202                              Name 42  "@fragcoord"
203                              Name 44  "VSOut.PositionPS"
204                              Name 52  "VSOut"
205                              Name 56  "VSOut.PosInLightViewSpace"
206                              Name 61  "VSOut.NormalWS"
207                              Name 66  "VSOut.TexCoord"
208                              Name 71  "@entryPointOutput"
209                              Name 72  "param"
210                              Decorate 28($Global) Block
211                              MemberDecorate 28($Global) 0 Offset 0
212                              MemberDecorate 28($Global) 1 Offset 16
213                              Decorate 30 Binding 0
214                              Decorate 30 DescriptorSet 0
215                              Decorate 44(VSOut.PositionPS) BuiltIn FragCoord
216                              Decorate 56(VSOut.PosInLightViewSpace) Location 0
217                              Decorate 61(VSOut.NormalWS) Location 1
218                              Decorate 66(VSOut.TexCoord) Location 2
219                              Decorate 71(@entryPointOutput) Location 0
220               2:             TypeVoid
221               3:             TypeFunction 2
222               6:             TypeFloat 32
223               7:             TypeVector 6(float) 4
224               8:             TypeVector 6(float) 3
225               9:             TypeVector 6(float) 2
226    10(VSOutput):             TypeStruct 7(fvec4) 8(fvec3) 8(fvec3) 9(fvec2)
227              11:             TypePointer Function 10(VSOutput)
228              12:             TypeFunction 7(fvec4) 11(ptr)
229              16:             TypeInt 32 1
230              17:     16(int) Constant 0
231              18:             TypeInt 32 0
232              19:     18(int) Constant 0
233              20:             TypePointer Function 6(float)
234              23:    6(float) Constant 1137180672
235              24:             TypeBool
236     28($Global):             TypeStruct 7(fvec4) 7(fvec4)
237              29:             TypePointer Uniform 28($Global)
238              30:     29(ptr) Variable Uniform
239              31:             TypePointer Uniform 7(fvec4)
240              36:     16(int) Constant 1
241              41:             TypePointer Function 7(fvec4)
242              43:             TypePointer Input 7(fvec4)
24344(VSOut.PositionPS):     43(ptr) Variable Input
244              46:    6(float) Constant 1065353216
245              47:     18(int) Constant 3
246              55:             TypePointer Input 8(fvec3)
24756(VSOut.PosInLightViewSpace):     55(ptr) Variable Input
248              58:             TypePointer Function 8(fvec3)
249              60:     16(int) Constant 2
25061(VSOut.NormalWS):     55(ptr) Variable Input
251              64:     16(int) Constant 3
252              65:             TypePointer Input 9(fvec2)
25366(VSOut.TexCoord):     65(ptr) Variable Input
254              68:             TypePointer Function 9(fvec2)
255              70:             TypePointer Output 7(fvec4)
25671(@entryPointOutput):     70(ptr) Variable Output
257         4(main):           2 Function None 3
258               5:             Label
259  42(@fragcoord):     41(ptr) Variable Function
260       52(VSOut):     11(ptr) Variable Function
261       72(param):     11(ptr) Variable Function
262              45:    7(fvec4) Load 44(VSOut.PositionPS)
263                              Store 42(@fragcoord) 45
264              48:     20(ptr) AccessChain 42(@fragcoord) 47
265              49:    6(float) Load 48
266              50:    6(float) FDiv 46 49
267              51:     20(ptr) AccessChain 42(@fragcoord) 47
268                              Store 51 50
269              53:    7(fvec4) Load 42(@fragcoord)
270              54:     41(ptr) AccessChain 52(VSOut) 17
271                              Store 54 53
272              57:    8(fvec3) Load 56(VSOut.PosInLightViewSpace)
273              59:     58(ptr) AccessChain 52(VSOut) 36
274                              Store 59 57
275              62:    8(fvec3) Load 61(VSOut.NormalWS)
276              63:     58(ptr) AccessChain 52(VSOut) 60
277                              Store 63 62
278              67:    9(fvec2) Load 66(VSOut.TexCoord)
279              69:     68(ptr) AccessChain 52(VSOut) 64
280                              Store 69 67
281              73:10(VSOutput) Load 52(VSOut)
282                              Store 72(param) 73
283              74:    7(fvec4) FunctionCall 14(@main(struct-VSOutput-vf4-vf3-vf3-vf21;) 72(param)
284                              Store 71(@entryPointOutput) 74
285                              Return
286                              FunctionEnd
28714(@main(struct-VSOutput-vf4-vf3-vf3-vf21;):    7(fvec4) Function None 12
288       13(VSOut):     11(ptr) FunctionParameter
289              15:             Label
290              21:     20(ptr) AccessChain 13(VSOut) 17 19
291              22:    6(float) Load 21
292              25:    24(bool) FOrdLessThan 22 23
293                              SelectionMerge 27 None
294                              BranchConditional 25 26 35
295              26:               Label
296              32:     31(ptr)   AccessChain 30 17
297              33:    7(fvec4)   Load 32
298                                ReturnValue 33
299              35:               Label
300              37:     31(ptr)   AccessChain 30 36
301              38:    7(fvec4)   Load 37
302                                ReturnValue 38
303              27:             Label
304                              Unreachable
305                              FunctionEnd
306