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

Author: Mike Blumenkrantz <[email protected]>
Date:   Sun Nov  8 13:02:35 2020 -0500

zink: call clear() instead of reset() for batch states on context destroy

this avoids (future) issues with desync due to long-lived fences which
may not yet have completed at the time the context is destroyed

upcoming changes will not allow resetting uncompleted batch states, so
this avoids any sort of conflict as such changes are introduced

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9765>

---

 src/gallium/drivers/zink/zink_context.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_context.c 
b/src/gallium/drivers/zink/zink_context.c
index c19c45d9484..d835c276cc4 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -302,16 +302,16 @@ zink_context_destroy(struct pipe_context *pctx)
 
    for (unsigned i = 0; i < ZINK_QUEUE_ANY; i++) {
       struct zink_fence *fence = zink_fence(&ctx->batches[i].state);
-      zink_reset_batch_state(ctx, ctx->batches[i].state);
+      zink_clear_batch_state(ctx, ctx->batches[i].state);
       zink_fence_reference(zink_screen(pctx->screen), &fence, NULL);
       hash_table_foreach(&ctx->batch_states[i], entry) {
          fence = entry->data;
-         zink_reset_batch_state(ctx, entry->data);
+         zink_clear_batch_state(ctx, entry->data);
          zink_fence_reference(zink_screen(pctx->screen), &fence, NULL);
       }
       util_dynarray_foreach(&ctx->free_batch_states[i], struct 
zink_batch_state*, bs) {
          fence = zink_fence(*bs);
-         zink_reset_batch_state(ctx, *bs);
+         zink_clear_batch_state(ctx, *bs);
          zink_fence_reference(zink_screen(pctx->screen), &fence, NULL);
       }
    }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to