xref: /aosp_15_r20/external/skia/tests/sksl/shared/CastsRoundTowardZero.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 "colorGreen"
9               OpMemberName %_UniformBuffer 1 "colorRed"
10               OpName %_entrypoint_v "_entrypoint_v"
11               OpName %main "main"
12               OpName %ok "ok"
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 %36 RelaxedPrecision
24               OpDecorate %39 RelaxedPrecision
25               OpDecorate %40 RelaxedPrecision
26      %float = OpTypeFloat 32
27    %v4float = OpTypeVector %float 4
28%_ptr_Output_v4float = OpTypePointer Output %v4float
29%sk_FragColor = OpVariable %_ptr_Output_v4float Output
30%_UniformBuffer = OpTypeStruct %v4float %v4float
31%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
32          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
33       %void = OpTypeVoid
34         %12 = OpTypeFunction %void
35    %float_0 = OpConstant %float 0
36    %v2float = OpTypeVector %float 2
37         %16 = OpConstantComposite %v2float %float_0 %float_0
38%_ptr_Function_v2float = OpTypePointer Function %v2float
39         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
40       %bool = OpTypeBool
41%_ptr_Function_bool = OpTypePointer Function %bool
42       %true = OpConstantTrue %bool
43%_ptr_Function_v4float = OpTypePointer Function %v4float
44%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
45        %int = OpTypeInt 32 1
46      %int_0 = OpConstant %int 0
47      %int_1 = OpConstant %int 1
48%_entrypoint_v = OpFunction %void None %12
49         %13 = OpLabel
50         %17 = OpVariable %_ptr_Function_v2float Function
51               OpStore %17 %16
52         %19 = OpFunctionCall %v4float %main %17
53               OpStore %sk_FragColor %19
54               OpReturn
55               OpFunctionEnd
56       %main = OpFunction %v4float None %20
57         %21 = OpFunctionParameter %_ptr_Function_v2float
58         %22 = OpLabel
59         %ok = OpVariable %_ptr_Function_bool Function
60         %27 = OpVariable %_ptr_Function_v4float Function
61               OpStore %ok %true
62               OpSelectionMerge %31 None
63               OpBranchConditional %true %29 %30
64         %29 = OpLabel
65         %32 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
66         %36 = OpLoad %v4float %32
67               OpStore %27 %36
68               OpBranch %31
69         %30 = OpLabel
70         %37 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
71         %39 = OpLoad %v4float %37
72               OpStore %27 %39
73               OpBranch %31
74         %31 = OpLabel
75         %40 = OpLoad %v4float %27
76               OpReturnValue %40
77               OpFunctionEnd
78