xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/CrossNoInline.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main" %sk_FragColor
5               OpExecutionMode %main OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "ah"
9               OpMemberName %_UniformBuffer 1 "bh"
10               OpMemberName %_UniformBuffer 2 "af"
11               OpMemberName %_UniformBuffer 3 "bf"
12               OpName %cross_length_2d_ff2f2 "cross_length_2d_ff2f2"
13               OpName %cross_length_2d_hh2h2 "cross_length_2d_hh2h2"
14               OpName %main "main"
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 8
21               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
22               OpMemberDecorate %_UniformBuffer 2 Offset 16
23               OpMemberDecorate %_UniformBuffer 3 Offset 24
24               OpDecorate %_UniformBuffer Block
25               OpDecorate %9 Binding 0
26               OpDecorate %9 DescriptorSet 0
27               OpDecorate %26 RelaxedPrecision
28               OpDecorate %27 RelaxedPrecision
29               OpDecorate %28 RelaxedPrecision
30               OpDecorate %29 RelaxedPrecision
31               OpDecorate %37 RelaxedPrecision
32               OpDecorate %41 RelaxedPrecision
33      %float = OpTypeFloat 32
34    %v4float = OpTypeVector %float 4
35%_ptr_Output_v4float = OpTypePointer Output %v4float
36%sk_FragColor = OpVariable %_ptr_Output_v4float Output
37    %v2float = OpTypeVector %float 2
38%_UniformBuffer = OpTypeStruct %v2float %v2float %v2float %v2float
39%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
40          %9 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
41%_ptr_Function_v2float = OpTypePointer Function %v2float
42         %14 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float
43%mat2v2float = OpTypeMatrix %v2float 2
44       %void = OpTypeVoid
45         %31 = OpTypeFunction %void
46%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
47        %int = OpTypeInt 32 1
48      %int_0 = OpConstant %int 0
49      %int_1 = OpConstant %int 1
50%_ptr_Output_float = OpTypePointer Output %float
51      %int_2 = OpConstant %int 2
52      %int_3 = OpConstant %int 3
53%cross_length_2d_ff2f2 = OpFunction %float None %14
54         %15 = OpFunctionParameter %_ptr_Function_v2float
55         %16 = OpFunctionParameter %_ptr_Function_v2float
56         %17 = OpLabel
57         %19 = OpLoad %v2float %15
58         %20 = OpLoad %v2float %16
59         %22 = OpCompositeConstruct %mat2v2float %19 %20
60         %18 = OpExtInst %float %1 Determinant %22
61               OpReturnValue %18
62               OpFunctionEnd
63%cross_length_2d_hh2h2 = OpFunction %float None %14
64         %23 = OpFunctionParameter %_ptr_Function_v2float
65         %24 = OpFunctionParameter %_ptr_Function_v2float
66         %25 = OpLabel
67         %27 = OpLoad %v2float %23
68         %28 = OpLoad %v2float %24
69         %29 = OpCompositeConstruct %mat2v2float %27 %28
70         %26 = OpExtInst %float %1 Determinant %29
71               OpReturnValue %26
72               OpFunctionEnd
73       %main = OpFunction %void None %31
74         %32 = OpLabel
75         %38 = OpVariable %_ptr_Function_v2float Function
76         %42 = OpVariable %_ptr_Function_v2float Function
77         %49 = OpVariable %_ptr_Function_v2float Function
78         %53 = OpVariable %_ptr_Function_v2float Function
79         %33 = OpAccessChain %_ptr_Uniform_v2float %9 %int_0
80         %37 = OpLoad %v2float %33
81               OpStore %38 %37
82         %39 = OpAccessChain %_ptr_Uniform_v2float %9 %int_1
83         %41 = OpLoad %v2float %39
84               OpStore %42 %41
85         %43 = OpFunctionCall %float %cross_length_2d_hh2h2 %38 %42
86         %44 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
87               OpStore %44 %43
88         %46 = OpAccessChain %_ptr_Uniform_v2float %9 %int_2
89         %48 = OpLoad %v2float %46
90               OpStore %49 %48
91         %50 = OpAccessChain %_ptr_Uniform_v2float %9 %int_3
92         %52 = OpLoad %v2float %50
93               OpStore %53 %52
94         %54 = OpFunctionCall %float %cross_length_2d_ff2f2 %49 %53
95         %55 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
96               OpStore %55 %54
97               OpReturn
98               OpFunctionEnd
99