zink: crash hard on unknown queries
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 12 Jul 2019 08:51:12 +0000 (10:51 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 28 Oct 2019 08:51:46 +0000 (08:51 +0000)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
src/gallium/drivers/zink/zink_query.c

index 9126f4b06767e85ee5837b1eb48271926f35506d..3d83d76d88e79a1c1cd02f1e65aa92216cad2ba5 100644 (file)
@@ -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");
    }
 }