From c94c36ece0322227bbef71771105a6d17e7a2ef9 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: (cherry picked from commit 3af12216e38ac9c4bdc4d8dc370d969e2a2b2976) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_resource.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 6b8b11c4396..162eb897090 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -787,7 +787,7 @@ "description": "panfrost: Unset shared/scanout binding flags for staging resources", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "e00d94f14f7f75d4974c1d48b4ec177f052723d3" }, diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index df8da262d64..960a7816a45 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);