diff options
author | Jason Ekstrand <[email protected]> | 2016-11-08 20:43:09 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-11-09 10:26:37 -0800 |
commit | 64b140498d51a593006a65149b372fed22b6e32d (patch) | |
tree | b71432a4aed33a2f4bd0922687a17c8a0eaf56f8 | |
parent | 7bcb94bc2fc45fde806ad3fd062bf2ce97342359 (diff) |
anv: Make anv_finishme only warn once per call-site
When you fire up Dota2 on Haswell you get spammed with thousands of
"Implement Gen7 HZ ops" finishme's. The point of anv_finishme is to act as
a reminder that there is something left to implement. Printing it once
should be sufficient.
Signed-off-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_private.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 8f5a95bd445..c71a88463e5 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -194,8 +194,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__); +#define anv_finishme(format, ...) ({ \ + static bool reported = false; \ + if (!reported) { \ + __anv_finishme(__FILE__, __LINE__, format, ##__VA_ARGS__); \ + reported = true; \ + } \ +}) /* A non-fatal assert. Useful for debugging. */ #ifdef DEBUG |