mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
targets/va: Build va driver into libgallium when building with dri
Currently va driver and dri driver are two separate libraries, when
radeonsi is enabled both libraries contain amdgpu winsys. radeonsi
needs shared winsys to ensure sync between OpenGL and VAAPI works.
Build va driver into libgallium to avoid having two instances of amdgpu
winsys.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11598
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31079>
(cherry picked from commit 212d57f7e6)
This commit is contained in:
parent
dcaf22d01c
commit
b51ea6a445
4 changed files with 47 additions and 11 deletions
|
|
@ -2044,7 +2044,7 @@
|
|||
"description": "targets/va: Build va driver into libgallium when building with dri",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -201,6 +201,17 @@ if with_gallium_rusticl
|
|||
subdir('frontends/rusticl')
|
||||
subdir('targets/rusticl')
|
||||
endif
|
||||
if with_glx == 'xlib'
|
||||
subdir('winsys/sw/xlib')
|
||||
subdir('frontends/glx/xlib')
|
||||
subdir('targets/libgl-xlib')
|
||||
endif
|
||||
if with_gallium_va
|
||||
subdir('frontends/va')
|
||||
if not with_dri
|
||||
subdir('targets/va')
|
||||
endif
|
||||
endif
|
||||
if with_dri
|
||||
subdir('frontends/dri')
|
||||
subdir('targets/dri')
|
||||
|
|
@ -209,11 +220,6 @@ if with_osmesa
|
|||
subdir('frontends/osmesa')
|
||||
subdir('targets/osmesa')
|
||||
endif
|
||||
if with_glx == 'xlib'
|
||||
subdir('winsys/sw/xlib')
|
||||
subdir('frontends/glx/xlib')
|
||||
subdir('targets/libgl-xlib')
|
||||
endif
|
||||
if with_gallium_vdpau
|
||||
subdir('frontends/vdpau')
|
||||
subdir('targets/vdpau')
|
||||
|
|
@ -222,10 +228,6 @@ if with_gallium_omx != 'disabled'
|
|||
subdir('frontends/omx')
|
||||
subdir('targets/omx')
|
||||
endif
|
||||
if with_gallium_va
|
||||
subdir('frontends/va')
|
||||
subdir('targets/va')
|
||||
endif
|
||||
if with_gallium_xa
|
||||
subdir('frontends/xa')
|
||||
subdir('targets/xa')
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
@amdgpu_winsys_create@
|
||||
@fd_drm_screen_create_renderonly@
|
||||
@ac_init_shared_llvm_once@
|
||||
@va_driver_init@
|
||||
local:
|
||||
*;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@ gallium_dri_c_args = []
|
|||
gallium_dri_ld_args = [cc.get_supported_link_arguments('-Wl,--default-symver')]
|
||||
gallium_dri_link_depends = []
|
||||
gallium_dri_drivers = []
|
||||
gallium_dri_link_with = []
|
||||
gallium_dri_link_whole = []
|
||||
|
||||
if with_gallium_va
|
||||
gallium_dri_link_with += [libgalliumvlwinsys]
|
||||
gallium_dri_link_whole += [libva_st]
|
||||
sym_config.set('va_driver_init', '__vaDriverInit_*_*;')
|
||||
endif
|
||||
|
||||
dri_sym = configure_file(input : 'dri.sym.in', output : 'dri.sym', configuration : sym_config)
|
||||
|
||||
|
|
@ -41,8 +49,9 @@ libgallium_dri = shared_library(
|
|||
link_with : [
|
||||
libdri, libmesa, libgalliumvl,
|
||||
libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
|
||||
libswkmsdri,
|
||||
libswkmsdri, gallium_dri_link_with
|
||||
],
|
||||
link_whole : [gallium_dri_link_whole],
|
||||
dependencies : [
|
||||
dep_selinux, dep_libdrm, dep_llvm, dep_thread, idep_xmlconfig, idep_mesautil,
|
||||
driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
|
||||
|
|
@ -54,3 +63,27 @@ libgallium_dri = shared_library(
|
|||
install : true,
|
||||
name_suffix : 'so',
|
||||
)
|
||||
|
||||
if with_gallium_va
|
||||
va_drivers = []
|
||||
foreach d : [[with_gallium_r600, 'r600'],
|
||||
[with_gallium_radeonsi, 'radeonsi'],
|
||||
[with_gallium_nouveau, 'nouveau'],
|
||||
[with_gallium_virgl, 'virtio_gpu'],
|
||||
[with_gallium_d3d12_video, 'd3d12']]
|
||||
if d[0]
|
||||
va_drivers += '@0@_drv_video.so'.format(d[1])
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if va_drivers.length() > 0
|
||||
meson.add_install_script(
|
||||
install_megadrivers_py.full_path(),
|
||||
libgallium_dri.full_path(),
|
||||
va_drivers_path,
|
||||
va_drivers,
|
||||
'--megadriver_libdir', get_option('libdir'),
|
||||
install_tag : 'runtime',
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue