瀏覽代碼

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 <jason@jlekstrand.net>
tags/17.0-branchpoint
Jason Ekstrand 9 年之前
父節點
當前提交
64b140498d
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      src/intel/vulkan/anv_private.h

+ 7
- 2
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

Loading…
取消
儲存