summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_dump_defines.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-07-27 11:50:41 +0200
committerNicolai Hähnle <[email protected]>2017-08-02 09:46:32 +0200
commitaff9c541250575c79f43707e03a3ef114feeebee (patch)
tree41129a97f7040ead70a733e7503ef3b6901d67cc /src/gallium/auxiliary/util/u_dump_defines.c
parent16923e42a419048b61b72f8fdae2aed32cf1212a (diff)
gallium: add util_dump_query_type and use it in ddebug
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util/u_dump_defines.c')
-rw-r--r--src/gallium/auxiliary/util/u_dump_defines.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_dump_defines.c b/src/gallium/auxiliary/util/u_dump_defines.c
index 098458afb90..c6db2de70b6 100644
--- a/src/gallium/auxiliary/util/u_dump_defines.c
+++ b/src/gallium/auxiliary/util/u_dump_defines.c
@@ -434,3 +434,13 @@ util_prim_mode_short_names[] = {
};
DEFINE_UTIL_STR_CONTINUOUS(prim_mode)
+
+void
+util_dump_query_type(FILE *stream, unsigned value)
+{
+ if (value >= PIPE_QUERY_DRIVER_SPECIFIC)
+ fprintf(stream, "PIPE_QUERY_DRIVER_SPECIFIC + %i",
+ value - PIPE_QUERY_DRIVER_SPECIFIC);
+ else
+ fprintf(stream, "%s", util_str_query_type(value, false));
+}