From 4a64ee192adf909bb29b1b7c8a5af3508cc35428 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 12 Jul 2019 10:51:12 +0200 Subject: [PATCH] zink: crash hard on unknown queries Acked-by: Jordan Justen --- src/gallium/drivers/zink/zink_query.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 9126f4b0676..3d83d76d88e 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -3,6 +3,8 @@ #include "zink_screen.h" #include "util/u_memory.h" +#include "util/u_dump.h" + struct zink_query { VkQueryPool queryPool; VkQueryType vkqtype; @@ -28,8 +30,9 @@ convert_query_type(unsigned query_type, bool *use_64bit, bool *precise) case PIPE_QUERY_PIPELINE_STATISTICS: return VK_QUERY_TYPE_PIPELINE_STATISTICS; default: - fprintf(stderr, "zink: unknown query type\n"); - return -1; + debug_printf("unknown query: %s\n", + util_str_query_type(query_type, true)); + unreachable("zink: unknown query type"); } } -- 2.30.2