From d6c431c2e3eecc6de73bc302f93290766c4c4f04 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: --- src/gallium/drivers/panfrost/pan_resource.c | 3 +++ src/panfrost/ci/panfrost-g52-fails.txt | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index 8ea749ef87c..b3da1d55731 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -924,6 +924,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 36ea72450df..9f0439189a2 100644 --- a/src/panfrost/ci/panfrost-g52-fails.txt +++ b/src/panfrost/ci/panfrost-g52-fails.txt @@ -374,9 +374,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