gbm/dri: Propagate queryDmaBufModifiers return value
authorMichel Dänzer <mdaenzer@redhat.com>
Wed, 15 Apr 2020 16:13:54 +0000 (18:13 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Apr 2020 10:19:35 +0000 (10:19 +0000)
commite58509cdeccc85adcf9127c6d1a462a73e7d5068
tree28149873119669cc02417d7c438d24a35ef33c27
parentb5b25ee0327f65d837ff84f59b497232d52ec25d
gbm/dri: Propagate queryDmaBufModifiers return value

We were treating count == 0 as the format not being supported at all,
but queryDmaBufModifiers would return false in that case.

Fixes spuriously reporting all formats as unsupported with radeonsi
(which doesn't support modifiers yet), which would e.g. cause mutter
to think the HW cursor format isn't supported and fall back to SW
cursor.

Suggested-by: Daniel Stone <daniels@collabora.com>
Fixes: 4e3a7dcf6ee4 "gallium: enable
                     EGL_EXT_image_dma_buf_import_modifiers
                     unconditionally"

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4532>
src/gbm/backends/dri/gbm_dri.c