diff --git a/.pick_status.json b/.pick_status.json index 9db8dd179ef..2ab965494ee 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -274,7 +274,7 @@ "description": "zink: refcount the correct query pool", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e5d517f36228c0788be58b00bdf23aa02f4dcf0c" }, diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 3777a9dea93..baea768928a 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -468,20 +468,18 @@ query_pool_get_range(struct zink_context *ctx, struct zink_query *q) vkq->pool->refcount++; } else { struct zink_query_pool *pool = find_or_allocate_qp(ctx, q, pool_idx); - pool->refcount++; - pool->last_range++; if (pool->last_range == NUM_QUERIES) { list_del(&pool->list); pool = find_or_allocate_qp(ctx, q, pool_idx); } vkq = CALLOC_STRUCT(zink_vk_query); + pool->refcount++; vkq->refcount = 1; vkq->needs_reset = true; vkq->pool = pool; vkq->started = false; - vkq->query_id = pool->last_range; - + vkq->query_id = pool->last_range++; } unref_vk_query(ctx, start->vkq[i]); start->vkq[i] = vkq;