xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/Cross.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 "testMatrix3x3"
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 0 ColMajor
18               OpMemberDecorate %_UniformBuffer 0 MatrixStride 16
19               OpMemberDecorate %_UniformBuffer 1 Offset 48
20               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
21               OpMemberDecorate %_UniformBuffer 2 Offset 64
22               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
23               OpDecorate %_UniformBuffer Block
24               OpDecorate %7 Binding 0
25               OpDecorate %7 DescriptorSet 0
26               OpDecorate %67 RelaxedPrecision
27               OpDecorate %69 RelaxedPrecision
28               OpDecorate %70 RelaxedPrecision
29      %float = OpTypeFloat 32
30    %v4float = OpTypeVector %float 4
31%_ptr_Output_v4float = OpTypePointer Output %v4float
32%sk_FragColor = OpVariable %_ptr_Output_v4float Output
33    %v3float = OpTypeVector %float 3
34%mat3v3float = OpTypeMatrix %v3float 3
35%_UniformBuffer = OpTypeStruct %mat3v3float %v4float %v4float
36%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
37          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
38       %void = OpTypeVoid
39         %14 = OpTypeFunction %void
40    %float_0 = OpConstant %float 0
41    %v2float = OpTypeVector %float 2
42         %18 = OpConstantComposite %v2float %float_0 %float_0
43%_ptr_Function_v2float = OpTypePointer Function %v2float
44         %22 = OpTypeFunction %v4float %_ptr_Function_v2float
45       %bool = OpTypeBool
46      %false = OpConstantFalse %bool
47%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
48        %int = OpTypeInt 32 1
49      %int_0 = OpConstant %int 0
50%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
51      %int_1 = OpConstant %int 1
52   %float_n3 = OpConstant %float -3
53    %float_6 = OpConstant %float 6
54         %41 = OpConstantComposite %v3float %float_n3 %float_6 %float_n3
55     %v3bool = OpTypeVector %bool 3
56      %int_2 = OpConstant %int 2
57  %float_n12 = OpConstant %float -12
58         %56 = OpConstantComposite %v3float %float_6 %float_n12 %float_6
59%_ptr_Function_v4float = OpTypePointer Function %v4float
60%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
61%_entrypoint_v = OpFunction %void None %14
62         %15 = OpLabel
63         %19 = OpVariable %_ptr_Function_v2float Function
64               OpStore %19 %18
65         %21 = OpFunctionCall %v4float %main %19
66               OpStore %sk_FragColor %21
67               OpReturn
68               OpFunctionEnd
69       %main = OpFunction %v4float None %22
70         %23 = OpFunctionParameter %_ptr_Function_v2float
71         %24 = OpLabel
72         %60 = OpVariable %_ptr_Function_v4float Function
73         %28 = OpAccessChain %_ptr_Uniform_mat3v3float %7 %int_0
74         %32 = OpAccessChain %_ptr_Uniform_v3float %28 %int_0
75         %34 = OpLoad %v3float %32
76         %35 = OpAccessChain %_ptr_Uniform_mat3v3float %7 %int_0
77         %37 = OpAccessChain %_ptr_Uniform_v3float %35 %int_1
78         %38 = OpLoad %v3float %37
79         %27 = OpExtInst %v3float %1 Cross %34 %38
80         %42 = OpFOrdEqual %v3bool %27 %41
81         %44 = OpAll %bool %42
82               OpSelectionMerge %46 None
83               OpBranchConditional %44 %45 %46
84         %45 = OpLabel
85         %48 = OpAccessChain %_ptr_Uniform_mat3v3float %7 %int_0
86         %50 = OpAccessChain %_ptr_Uniform_v3float %48 %int_2
87         %51 = OpLoad %v3float %50
88         %52 = OpAccessChain %_ptr_Uniform_mat3v3float %7 %int_0
89         %53 = OpAccessChain %_ptr_Uniform_v3float %52 %int_0
90         %54 = OpLoad %v3float %53
91         %47 = OpExtInst %v3float %1 Cross %51 %54
92         %57 = OpFOrdEqual %v3bool %47 %56
93         %58 = OpAll %bool %57
94               OpBranch %46
95         %46 = OpLabel
96         %59 = OpPhi %bool %false %24 %58 %45
97               OpSelectionMerge %64 None
98               OpBranchConditional %59 %62 %63
99         %62 = OpLabel
100         %65 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
101         %67 = OpLoad %v4float %65
102               OpStore %60 %67
103               OpBranch %64
104         %63 = OpLabel
105         %68 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
106         %69 = OpLoad %v4float %68
107               OpStore %60 %69
108               OpBranch %64
109         %64 = OpLabel
110         %70 = OpLoad %v4float %60
111               OpReturnValue %70
112               OpFunctionEnd
113