gbm: Don't pass default usage flags on ABIs < 1
authorJames Jones <jajones@nvidia.com>
Fri, 19 Nov 2021 19:50:18 +0000 (11:50 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Dec 2021 09:49:47 +0000 (09:49 +0000)
commitc2550d1b7ca8146283265ce6f4267fa2b3591946
treea301d7c9e723a6b2bc90c4e1551ba4b4be7667a0
parent31efef7b3a16b639fa6df44120e85763b86fec55
gbm: Don't pass default usage flags on ABIs < 1

Older drivers will not expect any flags from the
GBM front-end when modifiers are in use, and will
likely fail the allocation or handle them
incorrectly as a result. Only specify usage flags
when allocating from a backend with an ABI >= 1,
as that's the ABI version that added support for
specifying usage flags along with modifiers.

Fixes: ad50b47a14e9 ("gbm: assume USE_SCANOUT in create_with_modifiers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5709
Signed-off-by: James Jones <jajones@nvidia.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14049>
src/gbm/main/gbm.c