Mesa (main): zink: add surface ref during rebind if unflushed usage
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 7 00:31:25 UTC 2021
Module: Mesa
Branch: main
Commit: 447ba04d87aac19f6162ca5e0414c2f4a7421561
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=447ba04d87aac19f6162ca5e0414c2f4a7421561
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue May 11 09:22:25 2021 -0400
zink: add surface ref during rebind if unflushed usage
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11692>
---
src/gallium/drivers/zink/zink_surface.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_surface.c b/src/gallium/drivers/zink/zink_surface.c
index 1ec88765f44..7cfc211e14a 100644
--- a/src/gallium/drivers/zink/zink_surface.c
+++ b/src/gallium/drivers/zink/zink_surface.c
@@ -256,6 +256,8 @@ zink_rebind_surface(struct zink_context *ctx, struct pipe_surface **psurface)
simple_mtx_lock(&screen->surface_mtx);
struct hash_entry *new_entry = _mesa_hash_table_search_pre_hashed(&screen->surface_cache, hash, &ivci);
+ if (zink_batch_usage_exists(surface->batch_uses))
+ zink_batch_reference_surface(&ctx->batch, surface);
surface_clear_fb_refs(screen, *psurface);
zink_descriptor_set_refs_clear(&surface->desc_set_refs, surface);
if (new_entry) {
More information about the mesa-commit
mailing list