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