gallium/util: add util_{str,dump}_query_value_type
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 27 Jul 2017 09:59:38 +0000 (11:59 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 2 Aug 2017 07:46:34 +0000 (09:46 +0200)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_dump.h
src/gallium/auxiliary/util/u_dump_defines.c

index 8ebdafacdcfd6de3b7fea6e852559843965778b4..3fa253e511f4604cb6a623e50f6e86d899968393 100644 (file)
@@ -84,12 +84,18 @@ util_str_tex_filter(unsigned value, boolean shortened);
 const char *
 util_str_query_type(unsigned value, boolean shortened);
 
+const char *
+util_str_query_value_type(unsigned value, boolean shortened);
+
 const char *
 util_str_prim_mode(unsigned value, boolean shortened);
 
 void
 util_dump_query_type(FILE *stream, unsigned value);
 
+void
+util_dump_query_value_type(FILE *stream, unsigned value);
+
 /*
  * p_state.h, through a FILE
  */
index c6db2de70b6531e45f59417c9a5cccc1db6f610b..5032974a880767bded9a54758ba3f70c86aee75d 100644 (file)
@@ -395,6 +395,25 @@ util_query_type_short_names[] = {
 DEFINE_UTIL_STR_CONTINUOUS(query_type)
 
 
+static const char *
+util_query_value_type_names[] = {
+   "PIPE_QUERY_TYPE_I32",
+   "PIPE_QUERY_TYPE_U32",
+   "PIPE_QUERY_TYPE_I64",
+   "PIPE_QUERY_TYPE_U64",
+};
+
+static const char *
+util_query_value_type_short_names[] = {
+   "i32",
+   "u32",
+   "i64",
+   "u64",
+};
+
+DEFINE_UTIL_STR_CONTINUOUS(query_value_type)
+
+
 static const char *
 util_prim_mode_names[] = {
    "PIPE_PRIM_POINTS",
@@ -444,3 +463,9 @@ util_dump_query_type(FILE *stream, unsigned value)
    else
       fprintf(stream, "%s", util_str_query_type(value, false));
 }
+
+void
+util_dump_query_value_type(FILE *stream, unsigned value)
+{
+   fprintf(stream, "%s", util_str_query_value_type(value, false));
+}