llvmpipe: Fix parameter queries for mulitplanar formats
For emulated multiplanar formats like PIPE_FORMAT_IYUV /
DRM_FORMAT_YUV420 resource->format is set to one of the sub-
formats, PIPE_FORMAT_R8_UNORM in this case. As this has only
one plane, users like `dri2_from_planar()` fail for queries
where plane > 0. This in turn breaks queries like
gbm_dri_bo_get_handle_for_plane() which is commonly used
by Wayland compositors to offload client supplied DMABufs
to KMS, using drmModeAddFB2WithModifiers().
Follow the example of most other drivers and return the number
of resources instead.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35915>
1 file changed