Skip to content

vulkan/wsi/wayland: ensure to pick latest tranche feedback

Yiwei Zhang requested to merge zzyiwei/mesa:vk-wl-transient-suboptimal into main

What does this MR do and why?

vulkan/wsi/wayland: ensure to pick latest tranche feedback

For a single format, there can exist multiple tranches during the same
dmabuf feedback. The later tranche is the latest and should be the one
to refer to when picking from the format tranches.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>

Test environment is Gnome (mutter wayland server impl). When switching vkcube-wayland from windowed to fullscreen, the chain is put into suboptimal state. Taking a closer look has figured out the below tranches received within the same dmabuf feedback for DRM_FORMAT_RGB565

MESA: info: surface_dmabuf_feedback_format_table
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=0, modifier=0
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=1, modifier=72057594037927937
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=2, modifier=72057594037927938
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=0, modifier=0
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=1, modifier=72057594037927937
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=2, modifier=72057594037927938
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=3, modifier=72057594037927942
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=4, modifier=72057594037927944
MESA: info: surface_dmabuf_feedback_tranche_formats: data=0x7f77e4690000, index=5, modifier=72057594037927935
MESA: info: surface_dmabuf_feedback_done

When evaluating the latest dmabuf feedback, we must pick the tranche feedback in the reverse order to respect the latest info.

Merge request reports