mpv/video/out/wldmabuf
Dudemanguy 7a80330be3 wayland: properly use tranche_formats when getting compositor formats
It's a bit roundabout, but we were doing this incorrectly before. The
format table alone isn't good enough because it is possible the the
compositor may advertise different formats for a specific device which
is a subset of the format table. What we need to do is add formats based
on the array in tranche_formats. Note that it is possible for the
compositor to send multiple tranches (was not able to simulate this but
it's allowed by the protocol). For mpv, we only care about the very
first one which is supposed to be the most preferred one. The compositor
can also send the entire chain of events (main device, format_table,
tranches, etc.) all over again. We handle this in the wayland code, but
handling this in mpv's core code isn't done. e.g. say a format in use
was suddenly no longer supported. We ideally should do a full reconfig
in this case, but that gets complicated and is pretty niche so save that
for another day. Multiple GPUs isn't taken into account either. We just
pick the first one. Not strictly correct, but close enough for us.
Fixes #14544.
2024-09-16 00:07:36 +00:00
..
context_wldmabuf.c
ra_wldmabuf.c wayland: properly use tranche_formats when getting compositor formats 2024-09-16 00:07:36 +00:00
ra_wldmabuf.h vo_dmabuf_wayland: reject formats not supported by the GPU 2024-09-16 00:07:36 +00:00