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