From 0b46921a79f989b9bbc9d2c7fa795dafd186f2c9 Mon Sep 17 00:00:00 2001 From: Ikshwaku Chauhan Date: Mon, 10 Oct 2022 13:34:48 +0530 Subject: [PATCH] minigbm: dri: Enabled useInvalidate for buffer invalidation. The drivers now require a loader with a working useInvalidate hook. If not enabled then "createNewScreen2" call will fail in mesa-22.2.0 onwards. BUG=b:245687387 TEST= screenshot --internal /tmp/test.png tast run graphics.GLBench Signed-off-by: Ikshwaku Chauhan Change-Id: I0f7319fb7193be6ea938209413e8fbfe3b7f0c93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/3941506 Reviewed-by: Tim Van Patten Reviewed-by: Dominik Behr --- dri.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dri.c b/dri.c index e4bf85d..27331cf 100644 --- a/dri.c +++ b/dri.c @@ -186,6 +186,10 @@ cleanup: return ret; } +const __DRIuseInvalidateExtension use_invalidate = { + .base = { __DRI_USE_INVALIDATE, 1 } +}; + /* * The caller is responsible for setting drv->priv to a structure that derives from dri_driver. */ @@ -193,7 +197,8 @@ int dri_init(struct driver *drv, const char *dri_so_path, const char *driver_suf { char fname[128]; const __DRIextension **(*get_extensions)(); - const __DRIextension *loader_extensions[] = { NULL }; + const __DRIextension *loader_extensions[] = { &use_invalidate.base, + NULL }; struct dri_driver *dri = drv->priv; char *node_name = drmGetRenderDeviceNameFromFd(drv_get_fd(drv));