[Mesa-dev] [PATCH 4/6] anv: print finishme messages only once
Lionel Landwerlin
llandwerlin at gmail.com
Wed Oct 12 22:28:02 UTC 2016
Some of the new Hiz finishme messages generate a lot of noise, maybe
displaying the warning once is a better approach.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
src/intel/vulkan/anv_private.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index fd886bf..0705263 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -195,7 +195,13 @@ void anv_loge_v(const char *format, va_list va);
* Print a FINISHME message, including its source location.
*/
#define anv_finishme(format, ...) \
- __anv_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__);
+ do { \
+ static bool __once_warned = false; \
+ if (unlikely(!__once_warned)) { \
+ __once_warned = true; \
+ __anv_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \
+ } \
+ } while (0)
/* A non-fatal assert. Useful for debugging. */
#ifdef DEBUG
--
2.9.3
More information about the mesa-dev
mailing list