zink: assert precise queries are occlusion queries
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 10 Aug 2021 14:17:39 +0000 (10:17 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Aug 2021 02:26:17 +0000 (02:26 +0000)
this should always be the case

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12583>

src/gallium/drivers/zink/zink_query.c

index 4f1e9ddec377b5b3c014160392930c28b45b56e0..8f9b1236dab2a860b7026737cd635150691432b9 100644 (file)
@@ -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;