gpu-next: vaapi and vulkan don't work together on amd GFX8
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Important Information
Provide following Information:
- mpv version: 0.35
- Linux Distribution and Version: Debian Sid
- Source of the mpv binary: apt
- If known which version of mpv introduced the problem: probably since gpu-next was added
- Window Manager and version: mutter 43.2 on Xorg
- GPU driver and version: mesa 22.3.4
Does not appear to be fixed in git.
Reproduction steps
Play a VAAPI-supported video with vo=gpu-next and gpu-api=vulkan
Expected behavior
VAAPI works.
Actual behavior
mpv checks for PL_HANDLE_DMA_BUF at https://github.com/mpv-player/mpv/blob/093db2f5650fd258621ceb5905cb62faa42cb52a/video/out/hwdec/dmabuf_interop_pl.c#L127 but libplacebo only provides this capability if GL is used (set in tex_handle_caps() at https://code.videolan.org/videolan/libplacebo/-/blob/master/src/opengl/gpu.c#L56). As a consequence VAAPI init fails and mpv falls back to vaapi-copy. GL works fine.
I am unsure if this is a libplacebo bug or if mpv is doing something wrong.
Log file
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with video/out/hwdec/dmabuf_interop_pl.c at the PL_HANDLE_DMA_BUF check, then compare it with libplacebo's tex_handle_caps() behavior in the linked source. Reproduce with a VAAPI-supported video using vo=gpu-next and gpu-api=vulkan on AMD GFX8, and inspect the linked mpv.log. Done means VAAPI initializes and works without falling back to vaapi-copy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100