xref: /aosp_15_r20/external/skia/tests/sksl/shared/NestedComparisonIntrinsics.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 "colorRed"
9               OpMemberName %_UniformBuffer 1 "colorGreen"
10               OpName %_entrypoint_v "_entrypoint_v"
11               OpName %main "main"
12               OpName %result "result"
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 RelaxedPrecision
18               OpMemberDecorate %_UniformBuffer 1 Offset 16
19               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
20               OpDecorate %_UniformBuffer Block
21               OpDecorate %7 Binding 0
22               OpDecorate %7 DescriptorSet 0
23               OpDecorate %33 RelaxedPrecision
24               OpDecorate %41 RelaxedPrecision
25               OpDecorate %49 RelaxedPrecision
26               OpDecorate %51 RelaxedPrecision
27               OpDecorate %52 RelaxedPrecision
28      %float = OpTypeFloat 32
29    %v4float = OpTypeVector %float 4
30%_ptr_Output_v4float = OpTypePointer Output %v4float
31%sk_FragColor = OpVariable %_ptr_Output_v4float Output
32%_UniformBuffer = OpTypeStruct %v4float %v4float
33%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
34          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
35       %void = OpTypeVoid
36         %12 = OpTypeFunction %void
37    %float_0 = OpConstant %float 0
38    %v2float = OpTypeVector %float 2
39         %16 = OpConstantComposite %v2float %float_0 %float_0
40%_ptr_Function_v2float = OpTypePointer Function %v2float
41         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
42       %bool = OpTypeBool
43     %v4bool = OpTypeVector %bool 4
44%_ptr_Function_v4bool = OpTypePointer Function %v4bool
45%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
46        %int = OpTypeInt 32 1
47      %int_0 = OpConstant %int 0
48    %float_2 = OpConstant %float 2
49         %35 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
50    %float_3 = OpConstant %float 3
51         %38 = OpConstantComposite %v4float %float_3 %float_3 %float_3 %float_3
52      %int_1 = OpConstant %int 1
53%_ptr_Function_v4float = OpTypePointer Function %v4float
54%_entrypoint_v = OpFunction %void None %12
55         %13 = OpLabel
56         %17 = OpVariable %_ptr_Function_v2float Function
57               OpStore %17 %16
58         %19 = OpFunctionCall %v4float %main %17
59               OpStore %sk_FragColor %19
60               OpReturn
61               OpFunctionEnd
62       %main = OpFunction %v4float None %20
63         %21 = OpFunctionParameter %_ptr_Function_v2float
64         %22 = OpLabel
65     %result = OpVariable %_ptr_Function_v4bool Function
66         %43 = OpVariable %_ptr_Function_v4float Function
67         %29 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
68         %33 = OpLoad %v4float %29
69         %28 = OpFOrdLessThan %v4bool %33 %35
70         %39 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
71         %41 = OpLoad %v4float %39
72         %36 = OpFOrdGreaterThan %v4bool %38 %41
73         %27 = OpLogicalEqual %v4bool %28 %36
74               OpStore %result %27
75         %42 = OpAll %bool %27
76               OpSelectionMerge %47 None
77               OpBranchConditional %42 %45 %46
78         %45 = OpLabel
79         %48 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
80         %49 = OpLoad %v4float %48
81               OpStore %43 %49
82               OpBranch %47
83         %46 = OpLabel
84         %50 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
85         %51 = OpLoad %v4float %50
86               OpStore %43 %51
87               OpBranch %47
88         %47 = OpLabel
89         %52 = OpLoad %v4float %43
90               OpReturnValue %52
91               OpFunctionEnd
92