diff --git a/.pick_status.json b/.pick_status.json index 3ef354bb6b8..4c6ea5ce391 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/meson.build b/src/gallium/meson.build index bdf61218623..d8e09ab9092 100644 --- a/src/gallium/meson.build +++ b/src/gallium/meson.build @@ -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') diff --git a/src/gallium/targets/dri/dri.sym.in b/src/gallium/targets/dri/dri.sym.in index 4d2391dd86e..53f55137539 100644 --- a/src/gallium/targets/dri/dri.sym.in +++ b/src/gallium/targets/dri/dri.sym.in @@ -7,6 +7,7 @@ @amdgpu_winsys_create@ @fd_drm_screen_create_renderonly@ @ac_init_shared_llvm_once@ + @va_driver_init@ local: *; }; diff --git a/src/gallium/targets/dri/meson.build b/src/gallium/targets/dri/meson.build index ad7302e74ac..41a477d3ae9 100644 --- a/src/gallium/targets/dri/meson.build +++ b/src/gallium/targets/dri/meson.build @@ -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