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:
@@ -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',
|
||||
|
@@ -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'),
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user