Module: Mesa Branch: main Commit: c03e79d7831f253b16d6f52f2fb959eb02257a8b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c03e79d7831f253b16d6f52f2fb959eb02257a8b
Author: Lucas Stach <[email protected]> Date: Tue Dec 15 14:59:21 2020 +0100 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 <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8106> --- src/loader/loader_dri_helper.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/loader/loader_dri_helper.c b/src/loader/loader_dri_helper.c index 21419f087d6..972ca2da26a 100644 --- a/src/loader/loader_dri_helper.c +++ b/src/loader/loader_dri_helper.c @@ -57,9 +57,15 @@ __DRIimage *loader_dri_create_image(__DRIscreen *screen, if (!has_valid_modifier) return NULL; - return image->createImageWithModifiers(screen, width, height, - dri_format, modifiers, - modifiers_count, loaderPrivate); + if (image->base.version >= 19 && image->createImageWithModifiers2) + return image->createImageWithModifiers2(screen, width, height, + 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 */ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
