Mesa (master): r300g: more informative warning in END_CS
Marek Olšák
mareko at kemper.freedesktop.org
Sat Jun 19 03:23:34 UTC 2010
Module: Mesa
Branch: master
Commit: 6acd2117c1b5700077b2220623a06d89fa5c14a7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6acd2117c1b5700077b2220623a06d89fa5c14a7
Author: Marek Olšák <maraeo at gmail.com>
Date: Sat Jun 19 04:55:24 2010 +0200
r300g: more informative warning in END_CS
---
src/gallium/drivers/r300/r300_cs.h | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index 030fad3..1db7da6 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -55,12 +55,16 @@
CS_DEBUG(cs_count = size;) \
} while (0)
+#ifdef DEBUG
#define END_CS do { \
- CS_DEBUG(if (cs_count != 0) \
- debug_printf("r300: Warning: cs_count off by %d\n", cs_count);) \
- CS_DEBUG(cs_count = 0;) \
+ if (cs_count != 0) \
+ debug_printf("r300: Warning: cs_count off by %d at (%s, %s:%i)\n", \
+ cs_count, __FUNCTION__, __FILE__, __LINE__); \
+ cs_count = 0; \
} while (0)
-
+#else
+#define END_CS
+#endif
/**
* Writing pure DWORDs.
More information about the mesa-commit
mailing list