projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81f8b82
)
anv: Define anv_validate macro
author
Chad Versace
<chad.versace@intel.com>
Tue, 20 Oct 2015 17:52:57 +0000
(10:52 -0700)
committer
Chad Versace
<chad.versace@intel.com>
Tue, 20 Oct 2015 17:55:54 +0000
(10:55 -0700)
If a block of code is annotated with anv_validate, then the block runs
only in debug builds.
src/vulkan/anv_private.h
patch
|
blob
|
history
diff --git
a/src/vulkan/anv_private.h
b/src/vulkan/anv_private.h
index 68598a9dd49422dd37ae33b33761b1d3b9404e0e..f03620f92ece236aeb0bf20eaf3e92821a14a990 100644
(file)
--- a/
src/vulkan/anv_private.h
+++ b/
src/vulkan/anv_private.h
@@
-164,6
+164,16
@@
void anv_loge_v(const char *format, va_list va);
#define anv_assert(x)
#endif
+/**
+ * If a block of code is annotated with anv_validate, then the block runs only
+ * in debug builds.
+ */
+#ifdef DEBUG
+#define anv_validate if (1)
+#else
+#define anv_validate if (0)
+#endif
+
void anv_abortf(const char *format, ...) anv_noreturn anv_printflike(1, 2);
void anv_abortfv(const char *format, va_list va) anv_noreturn;