From 3af12216e38ac9c4bdc4d8dc370d969e2a2b2976 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Fri, 16 Apr 2021 09:45:48 +1200 Subject: [PATCH] panfrost: Unset shared/scanout binding flags for staging resources Fixes Xwayland crashes when starting non-GL applications. Fixes: e00d94f14f7 ("panfrost: Enable AFBC buffer sharing") Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index c4748b29d24..a7e030d8b98 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -732,6 +732,7 @@ pan_alloc_staging(struct panfrost_context *ctx, struct panfrost_resource *rsc, } tmpl.last_level = 0; tmpl.bind |= PIPE_BIND_LINEAR; + tmpl.bind &= ~(PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_SCANOUT | PIPE_BIND_SHARED); struct pipe_resource *pstaging = pctx->screen->resource_create(pctx->screen, &tmpl);