-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vo_gpu: vulkan: open DRM render fd when using VK_KHR_display #9440
Conversation
bae8760
to
e0b1c13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On AMD it picked vaapi-copy for me with hwdec=auto
. That's the same thing the vulkan backend does on wayland for me so it works here at least.
[ 0.124][v][vd] Requesting pixfmt 'vaapi_vld' from decoder.
[ 0.125][d][ffmpeg/video] h264: Reinit context to 640x368, pix_fmt: vaapi_vld
[ 0.158][i][vd] Using hardware decoding (vaapi-copy).
vaapi-copy always works. You need the open fd to be able to use the dmabuf passing. |
e0b1c13
to
f1ef2d5
Compare
f1ef2d5
to
77ab182
Compare
While the basic Vulkan Display context can theoretically drive the display without the involvement of any non-Vulkan code, that prevents us from using VAAPI acceleration. When initialising VAAPI without a window system, we need to provide it with an opened DRM render fd corresponding to the device to use. In the context of using VK_KHR_display, that means we need to identify which DRM device matches the selected Vulkan device, and then open its render fd and set the necessary state that VAAPI expects to find. With that done, the normal VAAPI<->Vulkan interop can kick in and we get working acceleration
77ab182
to
645aa15
Compare
@evelikov Thanks for the comments! Updated. |
Looking great, thanks o/ |
While the basic Vulkan Display context can theoretically drive the
display without the involvement of any non-Vulkan code, that prevents
us from using VAAPI acceleration. When initialising VAAPI without a
window system, we need to provide it with an opened DRM render fd
corresponding to the device to use.
In the context of using VK_KHR_display, that means we need to identify
which DRM device matches the selected Vulkan device, and then open its
render fd and set the necessary state that VAAPI expects to find.
With that done, the normal VAAPI<->Vulkan interop can kick in and we
get working acceleration