meson: centralize galliumvl_stub handling

This way frontends can simply link against the stub, but get the full
version if it's actually required (e.g. for radeonsi).

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26680>
This commit is contained in:
Karol Herbst
2024-05-27 12:44:54 +02:00
committed by Marge Bot
parent 6c9c48a3ae
commit b6f281bcb5
3 changed files with 12 additions and 16 deletions

View File

@@ -548,7 +548,7 @@ if with_tests
)
endif
libgalliumvl_stub = static_library(
_libgalliumvl_stub = static_library(
'galliumvl_stub',
'vl/vl_stubs.c',
c_args : [c_msvc_compat_args],
@@ -570,6 +570,15 @@ libgalliumvl = static_library(
build_by_default : false,
)
# some drivers export their screen creation function globally, so all frontends have to contain the
# full libgalliumvl. So we'll handle this here globally for everybody.
if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
with_dri or with_gallium_radeonsi)
libgalliumvl_stub = libgalliumvl
else
libgalliumvl_stub = _libgalliumvl_stub
endif
# XXX: The dependencies here may be off...
libgalliumvlwinsys = static_library(
'galliumvlwinsys',

View File

@@ -12,7 +12,7 @@ gallium_nine_link_depends = []
gallium_nine_link_with = [
libgallium, libnine_st,
libpipe_loader_static, libws_null, libwsw, libswdri,
libswkmsdri,
libswkmsdri, libgalliumvl_stub,
]
if with_ld_version_script
@@ -20,13 +20,6 @@ if with_ld_version_script
gallium_nine_link_depends += files('d3dadapter9.sym')
endif
if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
with_dri)
gallium_nine_link_with += libgalliumvl
else
gallium_nine_link_with += libgalliumvl_stub
endif
libgallium_nine = shared_library(
'd3dadapter9',
files('description.c', 'getproc.c', 'drm.c'),

View File

@@ -20,19 +20,13 @@
pipe_loader_link_args = [ld_args_gc_sections, ld_args_build_id]
pipe_loader_link_deps = []
pipe_loader_link_with = [libgallium]
pipe_loader_link_with = [libgallium, libgalliumvl_stub]
pipe_loader_comp_args = []
pipe_loader_incs = [
inc_include, inc_src, inc_util, inc_gallium, inc_gallium_drivers,
inc_gallium_winsys, inc_gallium_aux,
]
if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled' or
with_dri or with_gallium_radeonsi)
pipe_loader_link_with += libgalliumvl
else
pipe_loader_link_with += libgalliumvl_stub
endif
if (with_gallium_va or with_gallium_vdpau or with_gallium_omx != 'disabled')
pipe_loader_link_with += libgalliumvlwinsys
endif