xref: /aosp_15_r20/external/skia/tests/sksl/shared/ArrayFollowedByScalar.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 %_entrypoint_v "_entrypoint_v"
8               OpName %main "main"
9               OpName %rgb "rgb"
10               OpName %a "a"
11               OpDecorate %sk_FragColor RelaxedPrecision
12               OpDecorate %sk_FragColor Location 0
13               OpDecorate %sk_FragColor Index 0
14               OpDecorate %rgb RelaxedPrecision
15               OpDecorate %_arr_float_int_3 ArrayStride 16
16               OpDecorate %a RelaxedPrecision
17               OpDecorate %35 RelaxedPrecision
18               OpDecorate %37 RelaxedPrecision
19               OpDecorate %39 RelaxedPrecision
20               OpDecorate %40 RelaxedPrecision
21      %float = OpTypeFloat 32
22    %v4float = OpTypeVector %float 4
23%_ptr_Output_v4float = OpTypePointer Output %v4float
24%sk_FragColor = OpVariable %_ptr_Output_v4float Output
25       %void = OpTypeVoid
26          %9 = OpTypeFunction %void
27    %float_0 = OpConstant %float 0
28    %v2float = OpTypeVector %float 2
29         %13 = OpConstantComposite %v2float %float_0 %float_0
30%_ptr_Function_v2float = OpTypePointer Function %v2float
31         %17 = OpTypeFunction %v4float %_ptr_Function_v2float
32        %int = OpTypeInt 32 1
33      %int_3 = OpConstant %int 3
34%_arr_float_int_3 = OpTypeArray %float %int_3
35%_ptr_Function__arr_float_int_3 = OpTypePointer Function %_arr_float_int_3
36%_ptr_Function_float = OpTypePointer Function %float
37      %int_0 = OpConstant %int 0
38    %float_1 = OpConstant %float 1
39      %int_1 = OpConstant %int 1
40      %int_2 = OpConstant %int 2
41%_entrypoint_v = OpFunction %void None %9
42         %10 = OpLabel
43         %14 = OpVariable %_ptr_Function_v2float Function
44               OpStore %14 %13
45         %16 = OpFunctionCall %v4float %main %14
46               OpStore %sk_FragColor %16
47               OpReturn
48               OpFunctionEnd
49       %main = OpFunction %v4float None %17
50         %18 = OpFunctionParameter %_ptr_Function_v2float
51         %19 = OpLabel
52        %rgb = OpVariable %_ptr_Function__arr_float_int_3 Function
53          %a = OpVariable %_ptr_Function_float Function
54         %28 = OpAccessChain %_ptr_Function_float %rgb %int_0
55               OpStore %28 %float_0
56         %31 = OpAccessChain %_ptr_Function_float %rgb %int_1
57               OpStore %31 %float_1
58         %33 = OpAccessChain %_ptr_Function_float %rgb %int_2
59               OpStore %33 %float_0
60               OpStore %a %float_1
61         %34 = OpAccessChain %_ptr_Function_float %rgb %int_0
62         %35 = OpLoad %float %34
63         %36 = OpAccessChain %_ptr_Function_float %rgb %int_1
64         %37 = OpLoad %float %36
65         %38 = OpAccessChain %_ptr_Function_float %rgb %int_2
66         %39 = OpLoad %float %38
67         %40 = OpCompositeConstruct %v4float %35 %37 %39 %float_1
68               OpReturnValue %40
69               OpFunctionEnd
70