xref: /aosp_15_r20/external/skia/tests/sksl/shared/TernaryNesting.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 "colorWhite"
9               OpName %_entrypoint_v "_entrypoint_v"
10               OpName %main "main"
11               OpName %colorBlue "colorBlue"
12               OpName %colorGreen "colorGreen"
13               OpName %colorRed "colorRed"
14               OpName %result "result"
15               OpDecorate %sk_FragColor RelaxedPrecision
16               OpDecorate %sk_FragColor Location 0
17               OpDecorate %sk_FragColor Index 0
18               OpMemberDecorate %_UniformBuffer 0 Offset 0
19               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
20               OpDecorate %_UniformBuffer Block
21               OpDecorate %7 Binding 0
22               OpDecorate %7 DescriptorSet 0
23               OpDecorate %colorBlue RelaxedPrecision
24               OpDecorate %29 RelaxedPrecision
25               OpDecorate %30 RelaxedPrecision
26               OpDecorate %31 RelaxedPrecision
27               OpDecorate %32 RelaxedPrecision
28               OpDecorate %33 RelaxedPrecision
29               OpDecorate %colorGreen RelaxedPrecision
30               OpDecorate %36 RelaxedPrecision
31               OpDecorate %37 RelaxedPrecision
32               OpDecorate %39 RelaxedPrecision
33               OpDecorate %40 RelaxedPrecision
34               OpDecorate %41 RelaxedPrecision
35               OpDecorate %colorRed RelaxedPrecision
36               OpDecorate %44 RelaxedPrecision
37               OpDecorate %45 RelaxedPrecision
38               OpDecorate %47 RelaxedPrecision
39               OpDecorate %48 RelaxedPrecision
40               OpDecorate %49 RelaxedPrecision
41               OpDecorate %result RelaxedPrecision
42               OpDecorate %52 RelaxedPrecision
43               OpDecorate %67 RelaxedPrecision
44               OpDecorate %75 RelaxedPrecision
45               OpDecorate %76 RelaxedPrecision
46               OpDecorate %77 RelaxedPrecision
47               OpDecorate %85 RelaxedPrecision
48               OpDecorate %93 RelaxedPrecision
49               OpDecorate %100 RelaxedPrecision
50               OpDecorate %101 RelaxedPrecision
51               OpDecorate %102 RelaxedPrecision
52      %float = OpTypeFloat 32
53    %v4float = OpTypeVector %float 4
54%_ptr_Output_v4float = OpTypePointer Output %v4float
55%sk_FragColor = OpVariable %_ptr_Output_v4float Output
56%_UniformBuffer = OpTypeStruct %v4float
57%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
58          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
59       %void = OpTypeVoid
60         %12 = OpTypeFunction %void
61    %float_0 = OpConstant %float 0
62    %v2float = OpTypeVector %float 2
63         %16 = OpConstantComposite %v2float %float_0 %float_0
64%_ptr_Function_v2float = OpTypePointer Function %v2float
65         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
66%_ptr_Function_v4float = OpTypePointer Function %v4float
67%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
68        %int = OpTypeInt 32 1
69      %int_0 = OpConstant %int 0
70       %bool = OpTypeBool
71     %v4bool = OpTypeVector %bool 4
72%_entrypoint_v = OpFunction %void None %12
73         %13 = OpLabel
74         %17 = OpVariable %_ptr_Function_v2float Function
75               OpStore %17 %16
76         %19 = OpFunctionCall %v4float %main %17
77               OpStore %sk_FragColor %19
78               OpReturn
79               OpFunctionEnd
80       %main = OpFunction %v4float None %20
81         %21 = OpFunctionParameter %_ptr_Function_v2float
82         %22 = OpLabel
83  %colorBlue = OpVariable %_ptr_Function_v4float Function
84 %colorGreen = OpVariable %_ptr_Function_v4float Function
85   %colorRed = OpVariable %_ptr_Function_v4float Function
86     %result = OpVariable %_ptr_Function_v4float Function
87         %57 = OpVariable %_ptr_Function_v4float Function
88         %63 = OpVariable %_ptr_Function_v4float Function
89         %70 = OpVariable %_ptr_Function_v4float Function
90         %80 = OpVariable %_ptr_Function_v4float Function
91         %88 = OpVariable %_ptr_Function_v4float Function
92         %96 = OpVariable %_ptr_Function_v4float Function
93         %25 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
94         %29 = OpLoad %v4float %25
95         %30 = OpVectorShuffle %v2float %29 %29 2 3
96         %31 = OpCompositeExtract %float %30 0
97         %32 = OpCompositeExtract %float %30 1
98         %33 = OpCompositeConstruct %v4float %float_0 %float_0 %31 %32
99               OpStore %colorBlue %33
100         %35 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
101         %36 = OpLoad %v4float %35
102         %37 = OpCompositeExtract %float %36 1
103         %38 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
104         %39 = OpLoad %v4float %38
105         %40 = OpCompositeExtract %float %39 3
106         %41 = OpCompositeConstruct %v4float %float_0 %37 %float_0 %40
107               OpStore %colorGreen %41
108         %43 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
109         %44 = OpLoad %v4float %43
110         %45 = OpCompositeExtract %float %44 0
111         %46 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
112         %47 = OpLoad %v4float %46
113         %48 = OpCompositeExtract %float %47 3
114         %49 = OpCompositeConstruct %v4float %45 %float_0 %float_0 %48
115               OpStore %colorRed %49
116         %51 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
117         %52 = OpLoad %v4float %51
118         %53 = OpFUnordNotEqual %v4bool %52 %33
119         %56 = OpAny %bool %53
120               OpSelectionMerge %60 None
121               OpBranchConditional %56 %58 %59
122         %58 = OpLabel
123         %61 = OpFOrdEqual %v4bool %41 %49
124         %62 = OpAll %bool %61
125               OpSelectionMerge %66 None
126               OpBranchConditional %62 %64 %65
127         %64 = OpLabel
128               OpStore %63 %49
129               OpBranch %66
130         %65 = OpLabel
131               OpStore %63 %41
132               OpBranch %66
133         %66 = OpLabel
134         %67 = OpLoad %v4float %63
135               OpStore %57 %67
136               OpBranch %60
137         %59 = OpLabel
138         %68 = OpFUnordNotEqual %v4bool %49 %41
139         %69 = OpAny %bool %68
140               OpSelectionMerge %73 None
141               OpBranchConditional %69 %71 %72
142         %71 = OpLabel
143               OpStore %70 %33
144               OpBranch %73
145         %72 = OpLabel
146         %74 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
147         %75 = OpLoad %v4float %74
148               OpStore %70 %75
149               OpBranch %73
150         %73 = OpLabel
151         %76 = OpLoad %v4float %70
152               OpStore %57 %76
153               OpBranch %60
154         %60 = OpLabel
155         %77 = OpLoad %v4float %57
156               OpStore %result %77
157         %78 = OpFOrdEqual %v4bool %49 %33
158         %79 = OpAll %bool %78
159               OpSelectionMerge %83 None
160               OpBranchConditional %79 %81 %82
161         %81 = OpLabel
162         %84 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
163         %85 = OpLoad %v4float %84
164               OpStore %80 %85
165               OpBranch %83
166         %82 = OpLabel
167         %86 = OpFUnordNotEqual %v4bool %49 %41
168         %87 = OpAny %bool %86
169               OpSelectionMerge %91 None
170               OpBranchConditional %87 %89 %90
171         %89 = OpLabel
172               OpStore %88 %77
173               OpBranch %91
174         %90 = OpLabel
175         %92 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
176         %93 = OpLoad %v4float %92
177         %94 = OpFOrdEqual %v4bool %49 %93
178         %95 = OpAll %bool %94
179               OpSelectionMerge %99 None
180               OpBranchConditional %95 %97 %98
181         %97 = OpLabel
182               OpStore %96 %33
183               OpBranch %99
184         %98 = OpLabel
185               OpStore %96 %49
186               OpBranch %99
187         %99 = OpLabel
188        %100 = OpLoad %v4float %96
189               OpStore %88 %100
190               OpBranch %91
191         %91 = OpLabel
192        %101 = OpLoad %v4float %88
193               OpStore %80 %101
194               OpBranch %83
195         %83 = OpLabel
196        %102 = OpLoad %v4float %80
197               OpReturnValue %102
198               OpFunctionEnd
199