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