From: Erik Faye-Lund Date: Fri, 12 Jul 2019 08:51:12 +0000 (+0200) Subject: zink: crash hard on unknown queries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a64ee192adf909bb29b1b7c8a5af3508cc35428;p=mesa.git zink: crash hard on unknown queries Acked-by: Jordan Justen --- 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"); } }