summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_debug.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-12-22 09:40:39 +0000
committerKeith Whitwell <keithw@vmware.com>2009-12-22 09:40:39 +0000
commitaa02683e45f1eaf61bba2ba7eeda7686efeed2ca (patch)
tree63e0ef2fa85e5d7ebd6ffc6ae9043ce0819251a2 /src/gallium/auxiliary/util/u_debug.c
parentebbc73d1aed283c9bc4aa2b37bed4374bbaec5b5 (diff)
parent0fc4dd3819af252c028ed43bbd668b4f34104e32 (diff)
Merge branch 'i965g-restart'
Conflicts: configure.ac
Diffstat (limited to 'src/gallium/auxiliary/util/u_debug.c')
-rw-r--r--src/gallium/auxiliary/util/u_debug.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index 27e0b0d159..4e01123fff 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
@@ -70,6 +70,7 @@
#include "util/u_stream.h"
#include "util/u_math.h"
#include "util/u_tile.h"
+#include "util/u_prim.h"
#ifdef PIPE_SUBSYSTEM_WINDOWS_DISPLAY
@@ -601,6 +602,32 @@ const char *pf_name( enum pipe_format format )
}
+
+static const struct debug_named_value pipe_prim_names[] = {
+#ifdef DEBUG
+ DEBUG_NAMED_VALUE(PIPE_PRIM_POINTS),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINES),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_LOOP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_STRIP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLES),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_STRIP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_FAN),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_QUADS),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_QUAD_STRIP),
+ DEBUG_NAMED_VALUE(PIPE_PRIM_POLYGON),
+#endif
+ DEBUG_NAMED_VALUE_END
+};
+
+
+const char *u_prim_name( unsigned prim )
+{
+ return debug_dump_enum(pipe_prim_names, prim);
+}
+
+
+
+
#ifdef DEBUG
void debug_dump_image(const char *prefix,
unsigned format, unsigned cpp,