summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/Makefile3
-rw-r--r--src/gallium/include/pipe/p_debug.h14
2 files changed, 16 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/Makefile b/src/gallium/auxiliary/util/Makefile
index 906a46d6b4e..2a3a9380b3b 100644
--- a/src/gallium/auxiliary/util/Makefile
+++ b/src/gallium/auxiliary/util/Makefile
@@ -7,7 +7,8 @@ C_SOURCES = \
p_debug.c \
p_tile.c \
p_util.c \
- u_mm.c
+ u_mm.c \
+ u_snprintf.c
include ../../Makefile.template
diff --git a/src/gallium/include/pipe/p_debug.h b/src/gallium/include/pipe/p_debug.h
index 2a11627b365..a14a1fc5f6c 100644
--- a/src/gallium/include/pipe/p_debug.h
+++ b/src/gallium/include/pipe/p_debug.h
@@ -58,8 +58,22 @@ extern "C" {
#endif
+/**
+ * Print debug messages.
+ *
+ * A debug message will be printed regardless of the DEBUG/NDEBUG macros.
+ *
+ * The actual channel used to output debug message is platform specific. To
+ * avoid misformating or truncation, follow these rules of thumb:
+ * - output whole lines
+ * - avoid outputing large strings (512 bytes is the current maximum length
+ * that is guaranteed to be printed in all platforms)
+ */
void debug_printf(const char *format, ...);
+/**
+ * @sa debug_printf
+ */
void debug_vprintf(const char *format, va_list ap);
void debug_assert_fail(const char *expr, const char *file, unsigned line);