xref: /aosp_15_r20/external/mesa3d/src/gallium/drivers/v3d/meson.build (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1# Copyright © 2017 Broadcom
2# SPDX-License-Identifier: MIT
3
4files_libv3d = files(
5  'v3d_blit.c',
6  'v3d_bufmgr.c',
7  'v3d_bufmgr.h',
8  'v3d_cl.c',
9  'v3d_cl.h',
10  'v3d_context.c',
11  'v3d_context.h',
12  'v3d_disk_cache.c',
13  'v3d_fence.c',
14  'v3d_formats.c',
15  'v3d_job.c',
16  'v3d_program.c',
17  'v3d_query.c',
18  'v3d_query.h',
19  'v3d_query_pipe.c',
20  'v3d_resource.c',
21  'v3d_resource.h',
22  'v3d_screen.c',
23  'v3d_screen.h',
24  'v3d_uniforms.c',
25)
26
27files_per_version = files(
28  'v3dx_draw.c',
29  'v3dx_emit.c',
30  'v3dx_format_table.c',
31  'v3dx_job.c',
32  'v3dx_query_perfcnt.c',
33  'v3dx_rcl.c',
34  'v3dx_state.c',
35  'v3dx_tfu.c',
36)
37
38v3d_args = ['-DV3D_BUILD_NEON', v3d_simulator_arg]
39
40v3d_versions = ['42', '71']
41
42per_version_libs = []
43foreach ver : v3d_versions
44  per_version_libs += static_library(
45    'v3d-v' + ver,
46    [files_per_version, v3d_xml_pack],
47    include_directories : [
48      inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
49      inc_gallium_drivers,
50    ],
51    c_args : [v3d_args, '-DV3D_VERSION=' + ver],
52    gnu_symbol_visibility : 'hidden',
53    dependencies : [dep_v3d_hw, dep_libdrm, dep_valgrind, idep_nir_headers, idep_mesautil],
54)
55
56endforeach
57
58libv3d = static_library(
59  'v3d',
60  [
61    files_libv3d,
62    v3d_xml_pack,
63  ],
64  include_directories : [
65    inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_broadcom,
66    inc_simulator, inc_gallium_drivers,
67  ],
68  c_args : [v3d_args],
69  cpp_args : [v3d_args],
70  gnu_symbol_visibility : 'hidden',
71  dependencies : [
72    dep_v3d_hw, dep_libdrm, dep_valgrind,
73    idep_nir_headers, idep_mesautil,
74  ],
75  link_with: [per_version_libs],
76)
77
78driver_v3d = declare_dependency(
79  compile_args : '-DGALLIUM_V3D',
80  link_with : [libv3d, libv3dwinsys, libbroadcom_cle, libbroadcom_v3d],
81  dependencies : idep_nir,
82)
83