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