Mesa (main): zink: only flag persistent resource maps for invalidation if they aren't coherent

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 2 03:28:05 UTC 2021


Module: Mesa
Branch: main
Commit: f223ee90047dc0c6e825e188a1dea3703c5061e2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f223ee90047dc0c6e825e188a1dea3703c5061e2

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May 14 14:52:20 2021 -0400

zink: only flag persistent resource maps for invalidation if they aren't coherent

coherent is already synchronized

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11688>

---

 src/gallium/drivers/zink/zink_batch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c
index f4098753a02..800f5a79de2 100644
--- a/src/gallium/drivers/zink/zink_batch.c
+++ b/src/gallium/drivers/zink/zink_batch.c
@@ -579,7 +579,7 @@ zink_batch_resource_usage_set(struct zink_batch *batch, struct zink_resource *re
       zink_batch_usage_set(&res->obj->reads, batch->state);
    }
    /* multiple array entries are fine */
-   if (res->obj->persistent_maps)
+   if (!res->obj->coherent && res->obj->persistent_maps)
       util_dynarray_append(&batch->state->persistent_resources, struct zink_resource_object*, res->obj);
 
    batch->has_work = true;



More information about the mesa-commit mailing list