• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2017 Broadcom
2# SPDX-License-Identifier: MIT
3
4inc_broadcom = include_directories('.', 'cle')
5
6subdir('cle')
7
8v3d_versions = ['42', '71']
9v3d_libs = []
10
11dep_v3d_hw = dependency('v3d_hw', required: false)
12with_v3d_hw = dep_v3d_hw.found()
13v3d_simulator_arg = '-DUSE_V3D_SIMULATOR=@0@'.format(with_v3d_hw.to_int())
14
15if with_gallium_v3d or with_broadcom_vk
16  subdir('compiler')
17  subdir('qpu')
18endif
19
20if with_v3d_hw
21  subdir('simulator')
22endif
23
24if with_tools.contains('drm-shim')
25  subdir('drm-shim')
26endif
27
28per_version_libs = []
29foreach ver : v3d_versions
30  per_version_libs += static_library(
31    'broadcom-v' + ver,
32    [
33      files('clif/v3dx_dump.c'),
34      v3d_xml_pack
35    ],
36    include_directories : [inc_include, inc_src, inc_broadcom],
37    c_args : [no_override_init_args, '-DV3D_VERSION=' + ver],
38    gnu_symbol_visibility : 'hidden',
39    dependencies: [dep_valgrind, dep_thread],
40  )
41endforeach
42
43v3d_args = ['-DV3D_BUILD_NEON']
44
45v3d_neon_c_args = []
46if host_machine.cpu_family() == 'arm'
47    v3d_neon_c_args = '-mfpu=neon'
48endif
49
50libv3d_neon = static_library(
51  'v3d_neon',
52  'common/v3d_tiling.c',
53  include_directories : [
54    inc_src, inc_include, inc_broadcom,
55  ],
56  c_args : [v3d_args, v3d_neon_c_args],
57  gnu_symbol_visibility : 'hidden',
58  dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers, idep_mesautil],
59)
60
61libbroadcom_v3d = static_library(
62  'broadcom_v3d',
63  [
64    files('common/v3d_debug.c', 'common/v3d_device_info.c', 'clif/clif_dump.c', 'common/v3d_util.c'),
65    v3d_xml_pack,
66  ],
67  include_directories : [inc_include, inc_src, inc_broadcom],
68  c_args : [no_override_init_args],
69  gnu_symbol_visibility : 'hidden',
70  link_whole : v3d_libs + per_version_libs,
71  link_with: [libv3d_neon],
72  build_by_default : false,
73  dependencies: [dep_valgrind, dep_thread, idep_mesautil, dep_libdrm],
74)
75
76subdir('perfcntrs')
77
78if with_perfetto and (with_datasources.contains('v3d') or with_datasources.contains('auto'))
79  subdir('ds')
80endif
81
82if with_broadcom_vk
83  subdir('vulkan')
84endif
85