Module: Mesa Branch: master Commit: a8d925f52eee2c0545470e639c21886801be99fb URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8d925f52eee2c0545470e639c21886801be99fb
Author: Mike Blumenkrantz <[email protected]> Date: Sun Mar 21 10:45:48 2021 -0400 zink: always reset batch states when finding a new one this is a bit safer Reviewed-by: Adam Jackson <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9753> --- src/gallium/drivers/zink/zink_batch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 191b98d89ae..bcc4310483c 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -202,10 +202,11 @@ init_batch_state(struct zink_context *ctx, struct zink_batch *batch) if (he) { //there may not be any entries available bs = he->data; _mesa_hash_table_remove(&ctx->batch_states[batch->queue], he); - zink_reset_batch_state(ctx, bs); } } - if (!bs) { + if (bs) + zink_reset_batch_state(ctx, bs); + else { if (!batch->state) { /* this is batch init, so create a few more states for later use */ for (int i = 0; i < 3; i++) { _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
