diff options
author | marha <marha@users.sourceforge.net> | 2012-01-09 17:12:32 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-09 17:12:32 +0100 |
commit | 63c3a3a61863ccdc2ff3ab6a9f34d4a6fb72a8c8 (patch) | |
tree | c2ec625befefca3759575095264161ffc2267572 /mesalib/src/gallium/auxiliary/util/u_debug.h | |
parent | 2ae775fec514a032da4e6ec7528c2ef98c3913ee (diff) | |
parent | a1e97828c89278770cb249039ec92d959440c640 (diff) | |
download | vcxsrv-63c3a3a61863ccdc2ff3ab6a9f34d4a6fb72a8c8.tar.gz vcxsrv-63c3a3a61863ccdc2ff3ab6a9f34d4a6fb72a8c8.tar.bz2 vcxsrv-63c3a3a61863ccdc2ff3ab6a9f34d4a6fb72a8c8.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_debug.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_debug.h | 19 |
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 |