loader/dri: hook up createImageWithModifiers2
Call into the new modifiers with usage createImage variant when available to provide the DRI implementation with more context about the allocation. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8106>
This commit is contained in:
@@ -57,9 +57,15 @@ __DRIimage *loader_dri_create_image(__DRIscreen *screen,
|
|||||||
if (!has_valid_modifier)
|
if (!has_valid_modifier)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return image->createImageWithModifiers(screen, width, height,
|
if (image->base.version >= 19 && image->createImageWithModifiers2)
|
||||||
dri_format, modifiers,
|
return image->createImageWithModifiers2(screen, width, height,
|
||||||
modifiers_count, loaderPrivate);
|
dri_format, modifiers,
|
||||||
|
modifiers_count, dri_usage,
|
||||||
|
loaderPrivate);
|
||||||
|
else
|
||||||
|
return image->createImageWithModifiers(screen, width, height,
|
||||||
|
dri_format, modifiers,
|
||||||
|
modifiers_count, loaderPrivate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No modifier given or fallback to the legacy createImage allowed */
|
/* No modifier given or fallback to the legacy createImage allowed */
|
||||||
|
Reference in New Issue
Block a user