diff options
author | Michel Dänzer <[email protected]> | 2020-04-15 18:13:54 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-16 10:19:35 +0000 |
commit | e58509cdeccc85adcf9127c6d1a462a73e7d5068 (patch) | |
tree | 28149873119669cc02417d7c438d24a35ef33c27 | |
parent | b5b25ee0327f65d837ff84f59b497232d52ec25d (diff) |
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 <[email protected]>
Fixes: 4e3a7dcf6ee4 "gallium: enable
EGL_EXT_image_dma_buf_import_modifiers
unconditionally"
Reviewed-by: Daniel Stone <[email protected]>
Reviewed-by: Simon Ser <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4532>
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 8fe6a0265fb..bc68f66766e 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -618,14 +618,12 @@ gbm_dri_is_format_supported(struct gbm_device *gbm, } } - /* Check if the driver returns any modifiers for this format; since linear - * is counted as a modifier, we will have at least one modifier for any - * supported format. */ + /* This returns false if the format isn't supported */ if (!dri->image->queryDmaBufModifiers(dri->screen, format, 0, NULL, NULL, &count)) return 0; - return (count > 0); + return 1; } static int |