xref: /aosp_15_r20/external/skia/tests/sksl/shared/OutParamsAreDistinct.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 %out_params_are_distinct_bhh "out_params_are_distinct_bhh"
12               OpName %main "main"
13               OpName %x "x"
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 %8 Binding 0
23               OpDecorate %8 DescriptorSet 0
24               OpDecorate %x RelaxedPrecision
25               OpDecorate %38 RelaxedPrecision
26               OpDecorate %39 RelaxedPrecision
27               OpDecorate %41 RelaxedPrecision
28               OpDecorate %42 RelaxedPrecision
29               OpDecorate %52 RelaxedPrecision
30               OpDecorate %55 RelaxedPrecision
31               OpDecorate %56 RelaxedPrecision
32      %float = OpTypeFloat 32
33    %v4float = OpTypeVector %float 4
34%_ptr_Output_v4float = OpTypePointer Output %v4float
35%sk_FragColor = OpVariable %_ptr_Output_v4float Output
36%_UniformBuffer = OpTypeStruct %v4float %v4float
37%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
38          %8 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
39       %void = OpTypeVoid
40         %13 = OpTypeFunction %void
41    %float_0 = OpConstant %float 0
42    %v2float = OpTypeVector %float 2
43         %17 = OpConstantComposite %v2float %float_0 %float_0
44%_ptr_Function_v2float = OpTypePointer Function %v2float
45       %bool = OpTypeBool
46%_ptr_Function_float = OpTypePointer Function %float
47         %23 = OpTypeFunction %bool %_ptr_Function_float %_ptr_Function_float
48    %float_1 = OpConstant %float 1
49    %float_2 = OpConstant %float 2
50      %false = OpConstantFalse %bool
51       %true = OpConstantTrue %bool
52         %34 = OpTypeFunction %v4float %_ptr_Function_v2float
53%_ptr_Function_v4float = OpTypePointer Function %v4float
54%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
55        %int = OpTypeInt 32 1
56      %int_0 = OpConstant %int 0
57      %int_1 = OpConstant %int 1
58%_entrypoint_v = OpFunction %void None %13
59         %14 = OpLabel
60         %18 = OpVariable %_ptr_Function_v2float Function
61               OpStore %18 %17
62         %20 = OpFunctionCall %v4float %main %18
63               OpStore %sk_FragColor %20
64               OpReturn
65               OpFunctionEnd
66%out_params_are_distinct_bhh = OpFunction %bool None %23
67         %24 = OpFunctionParameter %_ptr_Function_float
68         %25 = OpFunctionParameter %_ptr_Function_float
69         %26 = OpLabel
70               OpStore %24 %float_1
71               OpStore %25 %float_2
72               OpSelectionMerge %32 None
73               OpBranchConditional %true %31 %32
74         %31 = OpLabel
75               OpBranch %32
76         %32 = OpLabel
77         %33 = OpPhi %bool %false %26 %true %31
78               OpReturnValue %33
79               OpFunctionEnd
80       %main = OpFunction %v4float None %34
81         %35 = OpFunctionParameter %_ptr_Function_v2float
82         %36 = OpLabel
83          %x = OpVariable %_ptr_Function_float Function
84         %38 = OpVariable %_ptr_Function_float Function
85         %39 = OpVariable %_ptr_Function_float Function
86         %43 = OpVariable %_ptr_Function_v4float Function
87               OpStore %x %float_0
88         %40 = OpFunctionCall %bool %out_params_are_distinct_bhh %38 %39
89         %41 = OpLoad %float %38
90               OpStore %x %41
91         %42 = OpLoad %float %39
92               OpStore %x %42
93               OpSelectionMerge %47 None
94               OpBranchConditional %40 %45 %46
95         %45 = OpLabel
96         %48 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0
97         %52 = OpLoad %v4float %48
98               OpStore %43 %52
99               OpBranch %47
100         %46 = OpLabel
101         %53 = OpAccessChain %_ptr_Uniform_v4float %8 %int_1
102         %55 = OpLoad %v4float %53
103               OpStore %43 %55
104               OpBranch %47
105         %47 = OpLabel
106         %56 = OpLoad %v4float %43
107               OpReturnValue %56
108               OpFunctionEnd
109