Skip to content

vo: prefer dmabuf_wayland over other fallback VOs#17497

Open
kasper93 wants to merge 1 commit intompv-player:masterfrom
kasper93:wl-fallback
Open

vo: prefer dmabuf_wayland over other fallback VOs#17497
kasper93 wants to merge 1 commit intompv-player:masterfrom
kasper93:wl-fallback

Conversation

@kasper93
Copy link
Copy Markdown
Member

@kasper93 kasper93 commented Mar 3, 2026

No description provided.

@na-na-hi
Copy link
Copy Markdown
Contributor

na-na-hi commented Mar 4, 2026

dmabuf_wayland scaling is most likely bilinear, worse than wlshm by default.

Also the documentation says:

It can still work in some circumstances without --hwdec due to mpv's internal conversion filters, but this is not recommended as it's a needless extra step.

Doesn't this mean that with the default config, it will always do something that is not recommended?

@kasper93
Copy link
Copy Markdown
Member Author

kasper93 commented Mar 4, 2026

dmabuf_wayland scaling is most likely bilinear, worse than wlshm by default.

If you want quality use gpu/gpu-next, if you want speed use dmabuf_wayland. wlshm is neither of those.

Also the documentation says:

It can still work in some circumstances without --hwdec due to mpv's internal conversion filters, but this is not recommended as it's a needless extra step.

Doesn't this mean that with the default config, it will always do something that is not recommended?

wslhm doesn't support mapping hardware frames at all.

Those extra steps described here, are basically the possibly frame upload and conversion (if needed), which will happen with any and all rendering pipelines at some point, only using hwdec can take advantage of fully on GPU processing.

Are you familiar with wlshm code? It supports only rgb8 output, with software scaler injected to do scaling and conversion on cpu. While the default scaling may be higher quality than bilinear the overhead of converting everything to rgb is not worth. Additionally it doesn't support HDR or anything other than srgb really, because software scalers are not configured to do any tonemapping or gammut mapping.

dmabuf_wayland can support all those things, it's basically wlshm on steroids. Allowing mapping hardware frame, allowing sending yuv frame direction.

@na-na-hi
Copy link
Copy Markdown
Contributor

na-na-hi commented Mar 4, 2026

if you want speed use dmabuf_wayland

On most hardware the speed advantage is minimal compared to profile=fast.

wlshm is neither of those.

wlshm has compatibility. dmabuf-wayland does not, and it is less compatible than gpu/gpu-next on most hardware. #14627

The context of this comparision is as a fallback for gpu/gpu-next, and I consider compatibility a higher priority here.

wslhm doesn't support mapping hardware frames at all.

For my second point I am not making any wlshm comparision. The documentation points out its many caveats and encourages users to use gpu/gpu-next instead.

@Dudemanguy
Copy link
Copy Markdown
Member

Compatibility is not a problem if it properly falls back during the autoprobe.

@na-na-hi
Copy link
Copy Markdown
Contributor

na-na-hi commented Mar 4, 2026

Compatibility is not a problem if it properly falls back during the autoprobe.

The same can be said for hwdec. It is not a problem if it properly falls back to software decoding when it does not work.

Given that dmabuf-wayland is highly dependent on GPU hardware and drivers, are you sure that it knows 100% when it does not work properly? Because the same point is used to argue against enabling hwdec by default.

@Dudemanguy
Copy link
Copy Markdown
Member

I really don't like bogus arguments. hwdec is known to cause gpu resets or permanent stalls on machines with bugged drivers.

@Dudemanguy
Copy link
Copy Markdown
Member

Just remembered but if we go forward with this, we can probably remove ra_ctx_create_by_name. That was created specifically for vo_dmabuf_wayland so it wouldn't be autoprobed since at the time it was very much a WIP VO that needed a lot of work. I think it's more than mature enough now so probably ra_ctx_create works fine.

Also we could remove Experimental from the manual entry/description of this VO driver while we're at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants