aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_debug.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-09 16:34:28 +0100
committermarha <marha@users.sourceforge.net>2012-01-09 16:34:28 +0100
commita1e97828c89278770cb249039ec92d959440c640 (patch)
treef3d4ed7e3f3d589c606f01b3c9e6de03d638e2d3 /mesalib/src/gallium/auxiliary/util/u_debug.h
parent7e9f4ea970e8f7008c212d7d3918a974eb0066da (diff)
downloadvcxsrv-a1e97828c89278770cb249039ec92d959440c640.tar.gz
vcxsrv-a1e97828c89278770cb249039ec92d959440c640.tar.bz2
vcxsrv-a1e97828c89278770cb249039ec92d959440c640.zip
xwininfo libX11 mesa mkfontscale xkeyboard-config git update 9 jan 2011
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_debug.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_debug.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_debug.h b/mesalib/src/gallium/auxiliary/util/u_debug.h
index cbea35830..ed19cda05 100644
--- a/mesalib/src/gallium/auxiliary/util/u_debug.h
+++ b/mesalib/src/gallium/auxiliary/util/u_debug.h
@@ -215,6 +215,25 @@ void _debug_assert_fail(const char *expr,
/**
+ * Emit a warning message, but only once.
+ */
+#ifdef DEBUG
+#define debug_warn_once(__msg) \
+ do { \
+ static bool warned = FALSE; \
+ if (!warned) { \
+ _debug_printf("%s:%u:%s: one time warning: %s\n", \
+ __FILE__, __LINE__, __FUNCTION__, __msg); \
+ warned = TRUE; \
+ } \
+ } while (0)
+#else
+#define debug_warn_once(__msg) \
+ ((void)0)
+#endif
+
+
+/**
* Output an error message. Not muted on release version.
*/
#ifdef DEBUG