Skip to content

etnaviv: fix gbm_bo_get_handle_for_plane for multiplanar images

Philipp Zabel requested to merge pH5/mesa:etnaviv-fix-multiplanar into main

Implement resource_get_param for PIPE_RESOURCE_PARAM_NPLANES and fix resource_get_handle to walk to the correct linked resource for multiplanar images, allowing gbm_bo_get_handle_for_plane to be called with plane > 0.

This fixes an assert that is triggered when a wayland client tries to send weston an NV12 dmabuf, for example:

weston: .../mesa/src/gbm/backends/dri/gbm_dri.c:752: gbm_dri_bo_get_handle_for_plane: Assertion `plane == 0' failed.

Fixes: 788f6dc8 ('Revert "gallium/dri: fix dri2_from_planar for multiplanar images"')

Merge request reports