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

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Mar 23 09:34:11 2021 -0400

zink: relax unreachable() to debug_printf when waiting on batch

I forgot that this was a reachable case pre-tc, but if there's no longer
a record of a batch_id then that just means it completed in the distant
past

Reviewed-by: Adam Jackson <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9772>

---

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

diff --git a/src/gallium/drivers/zink/zink_context.c 
b/src/gallium/drivers/zink/zink_context.c
index b8419c48e1c..4f619e6789a 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1872,6 +1872,9 @@ zink_wait_on_batch(struct zink_context *ctx, enum 
zink_queue queue, uint32_t bat
            if ((*bs)->fence.batch_id == batch_id)
               return;
         }
+        if (ctx->last_fence[queue] && ctx->last_fence[queue]->batch_id > 
batch_id)
+           /* already completed */
+           return;
         unreachable("should've found batch state");
       }
       fence = he->data;

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

Reply via email to