vaapi: add support for vaapi-win32

Only vaapi-copy variant as nothing can map D3D12 resources currently.

And even if we would add resource sharing to D3D11 it would invoke copy
at some point, so there is no point really. Maybe in the future when
libplacebo get smarter about resource sharing on Windows, but practical
advantages are really small. I've tested it with Vulkan <-> D3D11
sharing and GPU <-> GPU copy is still invoked. Better than CPU memcpy,
something for the future.
This commit is contained in:
Kacper Michajłow
2023-11-08 00:05:40 +01:00
committed by sfan5
parent 73eecdb415
commit 67deebc5b5
4 changed files with 65 additions and 5 deletions

View File

@@ -1401,8 +1401,15 @@ if features['vaapi-x11']
sources += files('video/out/vo_vaapi.c')
endif
vaapi_win32 = dependency('libva-win32', required: get_option('vaapi-win32').require(libva.found()))
features += {'vaapi-win32': vaapi_win32.found()}
if features['vaapi-win32']
dependencies += vaapi_win32
endif
vaapi = get_option('vaapi').require(libva.found() and (features['vaapi-drm'] or
features['vaapi-wayland'] or features['vaapi-x11']))
features['vaapi-wayland'] or features['vaapi-x11'] or
features['vaapi-win32']))
features += {'vaapi': vaapi.allowed()}
if features['vaapi']