dri: don't call modifier interfaces when modifiers_count is 0
The wayland EGL platform sets the modifier count to 0 in some cases
to signal that modifiers should not be used, even if a list of modifiers
is present. The loader_dri_create_image helper didn't handle this case
properly and called the modifierful driver interface with a 0 modifier
count, leading to the obvious outcome of the driver being unable to
allocate an image.
Fixes: cb9ae4273d
("dri: add loader_dri_create_image helper")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10903>
This commit is contained in:
parent
8b180ab98b
commit
77fcf70082
|
@ -37,7 +37,7 @@ __DRIimage *loader_dri_create_image(__DRIscreen *screen,
|
||||||
unsigned int modifiers_count,
|
unsigned int modifiers_count,
|
||||||
void *loaderPrivate)
|
void *loaderPrivate)
|
||||||
{
|
{
|
||||||
if (modifiers &&
|
if (modifiers && modifiers_count > 0 &&
|
||||||
image->base.version > 14 && image->createImageWithModifiers) {
|
image->base.version > 14 && image->createImageWithModifiers) {
|
||||||
bool has_valid_modifier = false;
|
bool has_valid_modifier = false;
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue