From 566771ee31d4a4bfa7e0f1b62409e2305a7fe922 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 3 Sep 2021 13:42:32 -0400 Subject: [PATCH] zink: add some asserts for buffer replacement Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index fc13f405d0a..842b1aa70a1 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -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);