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