zink: add some asserts for buffer replacement

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12822>
This commit is contained in:
Mike Blumenkrantz 2021-09-03 13:42:32 -04:00 committed by Marge Bot
parent f44d8d8b74
commit 566771ee31

View file

@ -3443,6 +3443,8 @@ zink_context_replace_buffer_storage(struct pipe_context *pctx, struct pipe_resou
struct zink_context *ctx = zink_context(pctx);
assert(d->internal_format == s->internal_format);
assert(d->obj);
assert(s->obj);
util_idalloc_mt_free(&zink_screen(pctx->screen)->buffer_ids, delete_buffer_id);
if (zink_resource_has_unflushed_usage(d))
zink_batch_reference_resource(&ctx->batch, d);