mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 11:20:41 +01:00
gallium/va: set up symlinks in build-dir
Without this libva won't be able to find the driver without LIBVA_DRIVER_NAME trickery, because the driver has a generic name. But in the DRI case, even LIBVA_DRIVER_NAME won't do, because the driver name needs to end with "_drv_video.so", which it doesn't. So let's instead set up symlinks in the build-dir, like DRIL does. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40136>
This commit is contained in:
parent
7e4744909b
commit
608d65db5b
4 changed files with 25 additions and 3 deletions
|
|
@ -2099,6 +2099,8 @@ else
|
|||
prog_flex_cpp = prog_flex
|
||||
endif
|
||||
|
||||
prog_ln = find_program('ln', required : false)
|
||||
|
||||
_libunwind = get_option('libunwind') \
|
||||
.require(not with_platform_android, error_message : 'Android requires the use of the backtrace library, not libunwind')
|
||||
if host_machine.system() == 'darwin'
|
||||
|
|
|
|||
|
|
@ -75,7 +75,17 @@ if with_gallium_va
|
|||
[with_gallium_virgl, 'virtio_gpu'],
|
||||
[with_gallium_d3d12_video, 'd3d12']]
|
||||
if d[0]
|
||||
va_drivers += '@0@_drv_video.so'.format(d[1])
|
||||
name = '@0@_drv_video.so'.format(d[1])
|
||||
va_drivers += name
|
||||
|
||||
if prog_ln.found()
|
||||
custom_target(
|
||||
name,
|
||||
output : name,
|
||||
command : [prog_ln, '-sf', libgallium_dri.full_path(), '@OUTPUT@'],
|
||||
build_by_default : true,
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,6 @@ foreach d : [[with_gallium_kmsro, [
|
|||
endforeach
|
||||
|
||||
# This only works on Unix-like oses, which is probably fine for dri
|
||||
prog_ln = find_program('ln', required : false)
|
||||
if prog_ln.found()
|
||||
foreach d : dril_drivers
|
||||
custom_target(
|
||||
|
|
|
|||
|
|
@ -92,7 +92,18 @@ else
|
|||
[with_gallium_virgl, 'virtio_gpu'],
|
||||
[with_gallium_d3d12_video, 'd3d12']]
|
||||
if d[0]
|
||||
va_drivers += '@0@_drv_video.so'.format(d[1])
|
||||
name = '@0@_drv_video.so'.format(d[1])
|
||||
va_drivers += name
|
||||
|
||||
if prog_ln.found()
|
||||
custom_target(
|
||||
name,
|
||||
output : name,
|
||||
command : [prog_ln, '-sf', libva_gallium.full_path(), '@OUTPUT@'],
|
||||
build_by_default : true,
|
||||
)
|
||||
endif
|
||||
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue