xref: /aosp_15_r20/external/skia/tests/sksl/spirv/ConstantVectorize.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               OpName %_entrypoint_v "_entrypoint_v"
10               OpName %main "main"
11               OpDecorate %sk_FragColor RelaxedPrecision
12               OpDecorate %sk_FragColor Location 0
13               OpDecorate %sk_FragColor Index 0
14               OpMemberDecorate %_UniformBuffer 0 Offset 0
15               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
16               OpDecorate %_UniformBuffer Block
17               OpDecorate %7 Binding 0
18               OpDecorate %7 DescriptorSet 0
19               OpDecorate %27 RelaxedPrecision
20      %float = OpTypeFloat 32
21    %v4float = OpTypeVector %float 4
22%_ptr_Output_v4float = OpTypePointer Output %v4float
23%sk_FragColor = OpVariable %_ptr_Output_v4float Output
24%_UniformBuffer = OpTypeStruct %v4float
25%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
26          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
27       %void = OpTypeVoid
28         %12 = OpTypeFunction %void
29    %float_0 = OpConstant %float 0
30    %v2float = OpTypeVector %float 2
31         %16 = OpConstantComposite %v2float %float_0 %float_0
32%_ptr_Function_v2float = OpTypePointer Function %v2float
33         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
34%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
35        %int = OpTypeInt 32 1
36      %int_0 = OpConstant %int 0
37%_entrypoint_v = OpFunction %void None %12
38         %13 = OpLabel
39         %17 = OpVariable %_ptr_Function_v2float Function
40               OpStore %17 %16
41         %19 = OpFunctionCall %v4float %main %17
42               OpStore %sk_FragColor %19
43               OpReturn
44               OpFunctionEnd
45       %main = OpFunction %v4float None %20
46         %21 = OpFunctionParameter %_ptr_Function_v2float
47         %22 = OpLabel
48         %23 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
49         %27 = OpLoad %v4float %23
50               OpReturnValue %27
51               OpFunctionEnd
52