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