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