gallium: Convenience debug_warning function.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 18 Mar 2008 11:49:02 +0000 (11:49 +0000)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 18 Mar 2008 17:20:56 +0000 (17:20 +0000)
src/gallium/include/pipe/p_debug.h

index f971ad3adc0bf68e8bb14de81912a6e59b986898..f3dfa062161ae9bd7eba1055545afe7b0ba2ad1d 100644 (file)
@@ -158,6 +158,16 @@ void debug_mask_vprintf(uint32_t uuid,
                         const char *format, 
                         va_list ap);
 
+
+#ifdef DEBUG
+#define debug_warning(__msg) \
+   debug_printf("%s:%i:warning: %s\n", __FILE__, __LINE__, (__msg)) 
+#else
+#define debug_warning(__msg) \
+   ((void)0) 
+#endif
+
+
 #ifdef __cplusplus
 }
 #endif