xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/Reflect.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "I"
9               OpMemberName %_UniformBuffer 1 "N"
10               OpMemberName %_UniformBuffer 2 "colorGreen"
11               OpMemberName %_UniformBuffer 3 "colorRed"
12               OpName %_entrypoint_v "_entrypoint_v"
13               OpName %main "main"
14               OpName %expectedX "expectedX"
15               OpName %expectedXY "expectedXY"
16               OpName %expectedXYZ "expectedXYZ"
17               OpName %expectedXYZW "expectedXYZW"
18               OpDecorate %sk_FragColor RelaxedPrecision
19               OpDecorate %sk_FragColor Location 0
20               OpDecorate %sk_FragColor Index 0
21               OpMemberDecorate %_UniformBuffer 0 Offset 0
22               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
23               OpMemberDecorate %_UniformBuffer 1 Offset 16
24               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
25               OpMemberDecorate %_UniformBuffer 2 Offset 32
26               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
27               OpMemberDecorate %_UniformBuffer 3 Offset 48
28               OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
29               OpDecorate %_UniformBuffer Block
30               OpDecorate %7 Binding 0
31               OpDecorate %7 DescriptorSet 0
32               OpDecorate %expectedX RelaxedPrecision
33               OpDecorate %25 RelaxedPrecision
34               OpDecorate %expectedXY RelaxedPrecision
35               OpDecorate %expectedXYZ RelaxedPrecision
36               OpDecorate %expectedXYZW RelaxedPrecision
37               OpDecorate %49 RelaxedPrecision
38               OpDecorate %54 RelaxedPrecision
39               OpDecorate %55 RelaxedPrecision
40               OpDecorate %58 RelaxedPrecision
41               OpDecorate %59 RelaxedPrecision
42               OpDecorate %63 RelaxedPrecision
43               OpDecorate %65 RelaxedPrecision
44               OpDecorate %66 RelaxedPrecision
45               OpDecorate %68 RelaxedPrecision
46               OpDecorate %69 RelaxedPrecision
47               OpDecorate %76 RelaxedPrecision
48               OpDecorate %78 RelaxedPrecision
49               OpDecorate %79 RelaxedPrecision
50               OpDecorate %81 RelaxedPrecision
51               OpDecorate %82 RelaxedPrecision
52               OpDecorate %89 RelaxedPrecision
53               OpDecorate %91 RelaxedPrecision
54               OpDecorate %93 RelaxedPrecision
55               OpDecorate %117 RelaxedPrecision
56               OpDecorate %120 RelaxedPrecision
57               OpDecorate %121 RelaxedPrecision
58      %float = OpTypeFloat 32
59    %v4float = OpTypeVector %float 4
60%_ptr_Output_v4float = OpTypePointer Output %v4float
61%sk_FragColor = OpVariable %_ptr_Output_v4float Output
62%_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float
63%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
64          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
65       %void = OpTypeVoid
66         %12 = OpTypeFunction %void
67    %float_0 = OpConstant %float 0
68    %v2float = OpTypeVector %float 2
69         %16 = OpConstantComposite %v2float %float_0 %float_0
70%_ptr_Function_v2float = OpTypePointer Function %v2float
71         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
72%_ptr_Function_float = OpTypePointer Function %float
73%float_996878592 = OpConstant %float 996878592
74%float_n1_99999996e_34 = OpConstant %float -1.99999996e+34
75  %float_n49 = OpConstant %float -49
76 %float_n169 = OpConstant %float -169
77  %float_202 = OpConstant %float 202
78         %32 = OpConstantComposite %v2float %float_n169 %float_202
79    %v3float = OpTypeVector %float 3
80%_ptr_Function_v3float = OpTypePointer Function %v3float
81 %float_n379 = OpConstant %float -379
82  %float_454 = OpConstant %float 454
83 %float_n529 = OpConstant %float -529
84         %39 = OpConstantComposite %v3float %float_n379 %float_454 %float_n529
85%_ptr_Function_v4float = OpTypePointer Function %v4float
86 %float_n699 = OpConstant %float -699
87  %float_838 = OpConstant %float 838
88 %float_n977 = OpConstant %float -977
89 %float_1116 = OpConstant %float 1116
90         %46 = OpConstantComposite %v4float %float_n699 %float_838 %float_n977 %float_1116
91       %bool = OpTypeBool
92      %false = OpConstantFalse %bool
93%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
94        %int = OpTypeInt 32 1
95      %int_0 = OpConstant %int 0
96      %int_1 = OpConstant %int 1
97     %v2bool = OpTypeVector %bool 2
98     %v3bool = OpTypeVector %bool 3
99     %v4bool = OpTypeVector %bool 4
100       %true = OpConstantTrue %bool
101      %int_2 = OpConstant %int 2
102      %int_3 = OpConstant %int 3
103%_entrypoint_v = OpFunction %void None %12
104         %13 = OpLabel
105         %17 = OpVariable %_ptr_Function_v2float Function
106               OpStore %17 %16
107         %19 = OpFunctionCall %v4float %main %17
108               OpStore %sk_FragColor %19
109               OpReturn
110               OpFunctionEnd
111       %main = OpFunction %v4float None %20
112         %21 = OpFunctionParameter %_ptr_Function_v2float
113         %22 = OpLabel
114  %expectedX = OpVariable %_ptr_Function_float Function
115 %expectedXY = OpVariable %_ptr_Function_v2float Function
116%expectedXYZ = OpVariable %_ptr_Function_v3float Function
117%expectedXYZW = OpVariable %_ptr_Function_v4float Function
118        %111 = OpVariable %_ptr_Function_v4float Function
119         %25 = OpExtInst %float %1 Reflect %float_996878592 %float_n1_99999996e_34
120               OpStore %expectedX %25
121               OpStore %expectedX %float_n49
122               OpStore %expectedXY %32
123               OpStore %expectedXYZ %39
124               OpStore %expectedXYZW %46
125         %50 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
126         %54 = OpLoad %v4float %50
127         %55 = OpCompositeExtract %float %54 0
128         %56 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
129         %58 = OpLoad %v4float %56
130         %59 = OpCompositeExtract %float %58 0
131         %49 = OpExtInst %float %1 Reflect %55 %59
132         %60 = OpFOrdEqual %bool %49 %float_n49
133               OpSelectionMerge %62 None
134               OpBranchConditional %60 %61 %62
135         %61 = OpLabel
136         %64 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
137         %65 = OpLoad %v4float %64
138         %66 = OpVectorShuffle %v2float %65 %65 0 1
139         %67 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
140         %68 = OpLoad %v4float %67
141         %69 = OpVectorShuffle %v2float %68 %68 0 1
142         %63 = OpExtInst %v2float %1 Reflect %66 %69
143         %70 = OpFOrdEqual %v2bool %63 %32
144         %72 = OpAll %bool %70
145               OpBranch %62
146         %62 = OpLabel
147         %73 = OpPhi %bool %false %22 %72 %61
148               OpSelectionMerge %75 None
149               OpBranchConditional %73 %74 %75
150         %74 = OpLabel
151         %77 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
152         %78 = OpLoad %v4float %77
153         %79 = OpVectorShuffle %v3float %78 %78 0 1 2
154         %80 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
155         %81 = OpLoad %v4float %80
156         %82 = OpVectorShuffle %v3float %81 %81 0 1 2
157         %76 = OpExtInst %v3float %1 Reflect %79 %82
158         %83 = OpFOrdEqual %v3bool %76 %39
159         %85 = OpAll %bool %83
160               OpBranch %75
161         %75 = OpLabel
162         %86 = OpPhi %bool %false %62 %85 %74
163               OpSelectionMerge %88 None
164               OpBranchConditional %86 %87 %88
165         %87 = OpLabel
166         %90 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
167         %91 = OpLoad %v4float %90
168         %92 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
169         %93 = OpLoad %v4float %92
170         %89 = OpExtInst %v4float %1 Reflect %91 %93
171         %94 = OpFOrdEqual %v4bool %89 %46
172         %96 = OpAll %bool %94
173               OpBranch %88
174         %88 = OpLabel
175         %97 = OpPhi %bool %false %75 %96 %87
176               OpSelectionMerge %99 None
177               OpBranchConditional %97 %98 %99
178         %98 = OpLabel
179               OpBranch %99
180         %99 = OpLabel
181        %101 = OpPhi %bool %false %88 %true %98
182               OpSelectionMerge %103 None
183               OpBranchConditional %101 %102 %103
184        %102 = OpLabel
185               OpBranch %103
186        %103 = OpLabel
187        %104 = OpPhi %bool %false %99 %true %102
188               OpSelectionMerge %106 None
189               OpBranchConditional %104 %105 %106
190        %105 = OpLabel
191               OpBranch %106
192        %106 = OpLabel
193        %107 = OpPhi %bool %false %103 %true %105
194               OpSelectionMerge %109 None
195               OpBranchConditional %107 %108 %109
196        %108 = OpLabel
197               OpBranch %109
198        %109 = OpLabel
199        %110 = OpPhi %bool %false %106 %true %108
200               OpSelectionMerge %114 None
201               OpBranchConditional %110 %112 %113
202        %112 = OpLabel
203        %115 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
204        %117 = OpLoad %v4float %115
205               OpStore %111 %117
206               OpBranch %114
207        %113 = OpLabel
208        %118 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
209        %120 = OpLoad %v4float %118
210               OpStore %111 %120
211               OpBranch %114
212        %114 = OpLabel
213        %121 = OpLoad %v4float %111
214               OpReturnValue %121
215               OpFunctionEnd
216