summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-07-27 11:59:38 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-07-31 18:28:35 +0200
commit9ac3042a5bfdb080f552e7e1c990f83bd35da214 (patch)
treed4f283610dd20b2588cdef56654129c3dca5750c
parent57309c52dbd60829c4388dbb88941baedac89ab0 (diff)
gallium/util: add util_{str,dump}_query_value_type
-rw-r--r--src/gallium/auxiliary/util/u_dump.h6
-rw-r--r--src/gallium/auxiliary/util/u_dump_defines.c25
2 files changed, 31 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_dump.h b/src/gallium/auxiliary/util/u_dump.h
index 8ebdafacdc..3fa253e511 100644
--- a/src/gallium/auxiliary/util/u_dump.h
+++ b/src/gallium/auxiliary/util/u_dump.h
@@ -85,11 +85,17 @@ 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
*/
diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c
index c6db2de70b..5032974a88 100644
--- a/src/gallium/auxiliary/util/u_dump_defines.c
+++ b/src/gallium/auxiliary/util/u_dump_defines.c
@@ -396,6 +396,25 @@ 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",
"PIPE_PRIM_LINES",
@@ -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));
+}