Skip to content

zink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier

Simon Ser requested to merge emersion/mesa:zink-fmt into main

Some format modifiers change the number of planes used by an image. For instance AMD DCC modifiers uses 2 or 3 planes. However the format modifier was ignored in the PIPE_RESOURCE_PARAM_NPLANES get_param hook.

Fix this by using get_dmabuf_modifier_planes() instead of util_format_get_num_planes().

This fixes wlroots-based compositors under zink.

Signed-off-by: Simon Ser contact@emersion.fr Fixes: c025cb9e ("zink: fix dmabuf plane returns")

Merge request reports