mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
meson: define driver dependencies
This allow us to encapsulate the compiler and linkage requirements of each driver in a reusable way. The result will be that each target that needs a specific driver can simply add `driver_<name>` to its dependencies line and the necessary libraries and compiler args will be added. This will allow for a lot of code de-duplication between gallium targets. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
parent
831d2fb012
commit
0bbecc5a85
16 changed files with 110 additions and 0 deletions
|
|
@ -100,3 +100,8 @@ etnaviv_compiler = executable(
|
|||
dependencies : [dep_libdrm_etnaviv, dep_lmsensors],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
driver_etnaviv = declare_dependency(
|
||||
compile_args : '-DGALLIUM_ETNAVIV',
|
||||
link_with : [libetnaviv, libetnavivdrm],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -220,6 +220,11 @@ libfreedreno = static_library(
|
|||
dependencies : [dep_libdrm, dep_libdrm_freedreno],
|
||||
)
|
||||
|
||||
driver_freedreno = declare_dependency(
|
||||
compile_args : '-DGALLIUM_FREEDRENO',
|
||||
link_with : [libfreedrenowinsys, libfreedreno],
|
||||
)
|
||||
|
||||
ir3_compiler = executable(
|
||||
'ir3_compiler',
|
||||
'ir3/ir3_cmdline.c',
|
||||
|
|
|
|||
|
|
@ -68,3 +68,8 @@ libi915 = static_library(
|
|||
c_args : [c_vis_args],
|
||||
include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux],
|
||||
)
|
||||
|
||||
driver_i915 = declare_dependency(
|
||||
compile_args : '-DGALLIUM_I915',
|
||||
link_with : [libi915, libi915drm],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -100,6 +100,14 @@ libllvmpipe = static_library(
|
|||
dependencies : dep_llvm,
|
||||
)
|
||||
|
||||
# This overwrites the softpipe driver dependency, but itself depends on the
|
||||
# softpipe dependency.
|
||||
driver_swrast = declare_dependency(
|
||||
compile_args : '-DGALLIUM_LLVMPIPE',
|
||||
link_with : libllvmpipe,
|
||||
dependencies : driver_swrast,
|
||||
)
|
||||
|
||||
if with_tests and with_gallium_softpipe and with_llvm
|
||||
foreach t : ['lp_test_format', 'lp_test_arit', 'lp_test_blend',
|
||||
'lp_test_conv', 'lp_test_printf']
|
||||
|
|
|
|||
|
|
@ -221,3 +221,8 @@ nouveau_compiler = executable(
|
|||
link_with : [libnouveau, libgallium, libmesa_util],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
driver_nouveau = declare_dependency(
|
||||
compile_args : '-DGALLIUM_NOUVEAU',
|
||||
link_with : [libnouveauwinsys, libnouveau],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -129,6 +129,11 @@ libr300 = static_library(
|
|||
dependencies : [dep_libdrm_radeon, dep_llvm],
|
||||
)
|
||||
|
||||
driver_r300 = declare_dependency(
|
||||
compile_args : '-DGALLIUM_R300',
|
||||
link_with : [libr300, libradeonwinsys],
|
||||
)
|
||||
|
||||
if with_tests
|
||||
test('r300_compiler_test', executable(
|
||||
'r300_compiler_test',
|
||||
|
|
|
|||
|
|
@ -126,3 +126,8 @@ libr600 = static_library(
|
|||
],
|
||||
dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm],
|
||||
)
|
||||
|
||||
driver_r600 = declare_dependency(
|
||||
compile_args : '-DGALLIUM_R600',
|
||||
link_with : [libr600, libradeonwinsys],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -79,3 +79,12 @@ libradeonsi = static_library(
|
|||
cpp_args : [cpp_vis_args],
|
||||
dependencies : dep_llvm,
|
||||
)
|
||||
|
||||
driver_radeonsi = declare_dependency(
|
||||
compile_args : '-DGALLIUM_RADEONSI',
|
||||
sources : si_driinfo_h,
|
||||
link_with : [
|
||||
libradeonsi, libradeon, libradeonwinsys, libamdgpuwinsys, libamd_common,
|
||||
libnir,
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -82,3 +82,8 @@ libsoftpipe = static_library(
|
|||
include_directories : [inc_gallium_aux, inc_gallium, inc_include, inc_src],
|
||||
c_args : [c_vis_args, c_msvc_compat_args],
|
||||
)
|
||||
|
||||
driver_swrast = declare_dependency(
|
||||
compile_args : '-DGALLIUM_SOFTPIPE',
|
||||
link_with : libsoftpipe
|
||||
)
|
||||
|
|
|
|||
|
|
@ -86,3 +86,8 @@ libsvga = static_library(
|
|||
include_directories('include')
|
||||
],
|
||||
)
|
||||
|
||||
driver_svga = declare_dependency(
|
||||
compile_args : '-DGALLIUM_VMWGFX',
|
||||
link_with : [libsvga, libsvgadrm],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -112,3 +112,8 @@ libvc4 = static_library(
|
|||
dependencies : [dep_simpenrose, dep_libdrm, dep_valgrind],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
driver_vc4 = declare_dependency(
|
||||
compile_args : '-DGALLIUM_VC4',
|
||||
link_with : [libvc4, libvc4winsys, libbroadcom_cle, libnir],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -62,3 +62,8 @@ libvc5 = static_library(
|
|||
cpp_args : [cpp_vis_args],
|
||||
dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind],
|
||||
)
|
||||
|
||||
driver_vc5 = declare_dependency(
|
||||
compile_args : '-DGALLIUM_VC5',
|
||||
link_with : [libvc5, libvc5winsys, libbroadcom_cle, libbroadcom_vc5, libnir],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -37,3 +37,8 @@ libvirgl = static_library(
|
|||
include_directories : inc_common,
|
||||
dependencies : dep_libdrm,
|
||||
)
|
||||
|
||||
driver_virgl = declare_dependency(
|
||||
compile_args : '-DGALLIUM_VIRGL',
|
||||
link_with : [libvirgl, libvirgldrm, libvirglvtest],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -37,59 +37,87 @@ if with_gallium_softpipe
|
|||
if with_llvm
|
||||
subdir('drivers/llvmpipe')
|
||||
endif
|
||||
else
|
||||
driver_swrast = declare_dependency()
|
||||
endif
|
||||
if with_gallium_r300 or with_gallium_radeonsi or with_gallium_r600
|
||||
subdir('winsys/radeon/drm')
|
||||
endif
|
||||
if with_gallium_r300
|
||||
subdir('drivers/r300')
|
||||
else
|
||||
driver_r300 = declare_dependency()
|
||||
endif
|
||||
if with_gallium_r600
|
||||
subdir('drivers/r600')
|
||||
else
|
||||
driver_r600 = declare_dependency()
|
||||
endif
|
||||
if with_gallium_radeonsi
|
||||
subdir('winsys/amdgpu/drm')
|
||||
subdir('drivers/radeon')
|
||||
subdir('drivers/radeonsi')
|
||||
else
|
||||
driver_radeonsi = declare_dependency()
|
||||
endif
|
||||
if with_gallium_nouveau
|
||||
subdir('winsys/nouveau/drm')
|
||||
subdir('drivers/nouveau')
|
||||
else
|
||||
driver_nouveau = declare_dependency()
|
||||
endif
|
||||
if with_gallium_freedreno
|
||||
subdir('winsys/freedreno/drm')
|
||||
subdir('drivers/freedreno')
|
||||
else
|
||||
driver_freedreno = declare_dependency()
|
||||
endif
|
||||
if with_gallium_pl111
|
||||
subdir('winsys/pl111/drm')
|
||||
else
|
||||
driver_pl111 = declare_dependency()
|
||||
endif
|
||||
if with_gallium_vc4
|
||||
subdir('winsys/vc4/drm')
|
||||
subdir('drivers/vc4')
|
||||
else
|
||||
driver_vc4 = declare_dependency()
|
||||
endif
|
||||
if with_gallium_vc5
|
||||
subdir('winsys/vc5/drm')
|
||||
subdir('drivers/vc5')
|
||||
else
|
||||
driver_vc5 = declare_dependency()
|
||||
endif
|
||||
if with_gallium_etnaviv
|
||||
subdir('winsys/etnaviv/drm')
|
||||
subdir('drivers/etnaviv')
|
||||
else
|
||||
driver_etnaviv = declare_dependency()
|
||||
endif
|
||||
if with_gallium_imx
|
||||
subdir('winsys/imx/drm')
|
||||
else
|
||||
driver_imx = declare_dependency()
|
||||
endif
|
||||
if with_gallium_i915
|
||||
subdir('winsys/i915/drm')
|
||||
subdir('drivers/i915')
|
||||
else
|
||||
driver_i915 = declare_dependency()
|
||||
endif
|
||||
if with_gallium_svga
|
||||
subdir('winsys/svga/drm')
|
||||
subdir('drivers/svga')
|
||||
else
|
||||
driver_svga = declare_dependency()
|
||||
endif
|
||||
if with_gallium_virgl
|
||||
subdir('winsys/virgl/drm')
|
||||
subdir('winsys/virgl/vtest')
|
||||
subdir('drivers/virgl')
|
||||
else
|
||||
driver_virgl = declare_dependency()
|
||||
endif
|
||||
# TODO: SWR
|
||||
# TODO: clover
|
||||
|
|
|
|||
|
|
@ -26,3 +26,8 @@ libimxdrm = static_library(
|
|||
include_directories('../..'),
|
||||
],
|
||||
)
|
||||
|
||||
driver_imx = declare_dependency(
|
||||
c_args : '-DGALLIUM_IMX',
|
||||
link_with : libimxdrm,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,3 +28,8 @@ libpl111winsys = static_library(
|
|||
c_args : [c_vis_args],
|
||||
dependencies: dep_libdrm,
|
||||
)
|
||||
|
||||
driver_pl111 = declare_dependency(
|
||||
c_args : '-DGALLIUM_PL111',
|
||||
link_with : libpl111winsys,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue