zink: relax unreachable() to debug_printf when waiting on batch
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 23 Mar 2021 13:34:11 +0000 (09:34 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 23 Mar 2021 16:50:37 +0000 (12:50 -0400)
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 <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9772>

src/gallium/drivers/zink/zink_context.c

index b8419c4..4f619e6 100644 (file)
@@ -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;