From 960e776f24cdd336b16d938448e5b5a4ffc1f781 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 10 Aug 2021 10:17:39 -0400 Subject: [PATCH] zink: assert precise queries are occlusion queries this should always be the case Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_query.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 4f1e9ddec37..8f9b1236dab 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -289,6 +289,8 @@ zink_create_query(struct pipe_context *pctx, if (query->vkqtype == -1) return NULL; + assert(!query->precise || query->vkqtype == VK_QUERY_TYPE_OCCLUSION); + query->curr_query = 0; pool_create.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO;