zink: fix tc buffer replacement rebind condition

this check is to detect multi-context rebinds, not to determine whether
all rebinds on the same context were successful

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36473>
This commit is contained in:
Mike Blumenkrantz 2025-07-30 13:40:57 -04:00 committed by Marge Bot
parent b4280887ed
commit f1ba8f44d9

View file

@ -5220,7 +5220,8 @@ zink_context_replace_buffer_storage(struct pipe_context *pctx, struct pipe_resou
num_rebinds = d->bind_count[0] + d->bind_count[1];
rebind_mask = 0;
}
if (num_rebinds && rebind_buffer(ctx, d, rebind_mask, num_rebinds) < num_rebinds)
unsigned rebind_count = num_rebinds ? rebind_buffer(ctx, d, rebind_mask, num_rebinds) : 0;
if (rebind_count != d->bind_count[0] + d->bind_count[1])
ctx->buffer_rebind_counter = p_atomic_inc_return(&screen->buffer_rebind_counter);
}