aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-17 08:04:15 +0200
committermarha <marha@users.sourceforge.net>2012-10-17 08:04:15 +0200
commitded57b5a4131a213d57f5a20d50b819b7a8924df (patch)
tree5be4cc93cf5d77df72f8ae6e34953e026bde071f /mesalib/src/gallium/auxiliary/util
parent54db46582aba2252d544fa3956522f9ef06b49cb (diff)
downloadvcxsrv-ded57b5a4131a213d57f5a20d50b819b7a8924df.tar.gz
vcxsrv-ded57b5a4131a213d57f5a20d50b819b7a8924df.tar.bz2
vcxsrv-ded57b5a4131a213d57f5a20d50b819b7a8924df.zip
pixman mesa git update 17 oct 2012
pixman: 6e56098c0338ce74228187e4c96fed1a66cb0956 mesa: 0199ff7fe323cf527ffacfdef3258ab85799dd13
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_debug.c41
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_debug.h4
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_double_list.h1
3 files changed, 46 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_debug.c b/mesalib/src/gallium/auxiliary/util/u_debug.c
index c41585fdd..b26192a8b 100644
--- a/mesalib/src/gallium/auxiliary/util/u_debug.c
+++ b/mesalib/src/gallium/auxiliary/util/u_debug.c
@@ -691,4 +691,45 @@ error1:
;
}
+
+/**
+ * Print PIPE_TRANSFER_x flags with a message.
+ */
+void
+debug_print_transfer_flags(const char *msg, unsigned usage)
+{
+#define FLAG(x) { x, #x }
+ static const struct {
+ unsigned bit;
+ const char *name;
+ } flags[] = {
+ FLAG(PIPE_TRANSFER_READ),
+ FLAG(PIPE_TRANSFER_WRITE),
+ FLAG(PIPE_TRANSFER_MAP_DIRECTLY),
+ FLAG(PIPE_TRANSFER_DISCARD_RANGE),
+ FLAG(PIPE_TRANSFER_DONTBLOCK),
+ FLAG(PIPE_TRANSFER_UNSYNCHRONIZED),
+ FLAG(PIPE_TRANSFER_FLUSH_EXPLICIT),
+ FLAG(PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)
+ };
+ unsigned i;
+
+ debug_printf("%s ", msg);
+
+ for (i = 0; i < Elements(flags); i++) {
+ if (usage & flags[i].bit) {
+ debug_printf("%s", flags[i].name);
+ usage &= ~flags[i].bit;
+ if (usage) {
+ debug_printf(" | ");
+ }
+ }
+ }
+
+ debug_printf("\n");
+#undef FLAG
+}
+
+
+
#endif
diff --git a/mesalib/src/gallium/auxiliary/util/u_debug.h b/mesalib/src/gallium/auxiliary/util/u_debug.h
index ec7d4a07a..14d319c2c 100644
--- a/mesalib/src/gallium/auxiliary/util/u_debug.h
+++ b/mesalib/src/gallium/auxiliary/util/u_debug.h
@@ -446,6 +446,10 @@ void debug_dump_float_rgba_bmp(const char *filename,
#endif
+void
+debug_print_transfer_flags(const char *msg, unsigned usage);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/mesalib/src/gallium/auxiliary/util/u_double_list.h b/mesalib/src/gallium/auxiliary/util/u_double_list.h
index 9d1129b18..408c26dfc 100644
--- a/mesalib/src/gallium/auxiliary/util/u_double_list.h
+++ b/mesalib/src/gallium/auxiliary/util/u_double_list.h
@@ -82,6 +82,7 @@ static INLINE void list_del(struct list_head *item)
{
item->prev->next = item->next;
item->next->prev = item->prev;
+ item->prev = item->next = NULL;
}
static INLINE void list_delinit(struct list_head *item)