From c3497b6e45126625564bbf08f95f00188f069242 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Tue, 15 Feb 2022 20:34:57 +1300 Subject: [PATCH] panfrost: Re-emit descriptors after resource shadowing This could be made slightly more efficient by only setting the dirty state that is needed, but eventually you reach a point where it's cheaper to re-emit everything than work out what can or can't be kept. Fixes rendering issues in Duckstation. Fixes: cd2c1ef9da6 ("panfrost: Dirty track textures/samplers") Part-of: (cherry picked from commit d6c431c2e3eecc6de73bc302f93290766c4c4f04) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_resource.c | 3 +++ src/panfrost/ci/panfrost-g52-fails.txt | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8dedc5e5b51..cbf6453ea00 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -616,7 +616,7 @@ "description": "panfrost: Re-emit descriptors after resource shadowing", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "cd2c1ef9da6c71c2d5f11e2b0843147b4c7069e3" }, diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index cd03a870222..4b1bc3414a8 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -929,6 +929,9 @@ panfrost_ptr_map(struct pipe_context *pctx, } if (create_new_bo) { + /* Make sure we re-emit any descriptors using this resource */ + panfrost_dirty_state_all(ctx); + /* If the BO is used by one of the pending batches or if it's * not ready yet (still accessed by one of the already flushed * batches), we try to allocate a new one to avoid waiting. diff --git a/src/panfrost/ci/panfrost-g52-fails.txt b/src/panfrost/ci/panfrost-g52-fails.txt index 45cdaea1d80..efa83ad1ad9 100644 --- a/src/panfrost/ci/panfrost-g52-fails.txt +++ b/src/panfrost/ci/panfrost-g52-fails.txt @@ -373,9 +373,7 @@ spec@arb_texture_rg@texwrap formats-float bordercolor-swizzled@GL_RG32F- swizzle spec@arb_texture_view@sampling-2d-array-as-cubemap-array,Crash spec@arb_texture_view@sampling-2d-array-as-cubemap,Crash spec@arb_transform_feedback_instanced@draw-auto instanced,Fail -spec@arb_uniform_buffer_object@rendering-dsa,Fail spec@arb_uniform_buffer_object@rendering-dsa-offset,Fail -spec@arb_uniform_buffer_object@rendering,Fail spec@arb_uniform_buffer_object@rendering-offset,Fail spec@arb_vertex_program@clip-plane-transformation arb,Fail spec@egl 1.4@eglterminate then unbind context,Fail