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