Module: Mesa Branch: master Commit: c5d99c9983f2fcc70757df224ff8dd8fee9a5215 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5d99c9983f2fcc70757df224ff8dd8fee9a5215
Author: Chad Versace <[email protected]> Date: Wed Jan 25 12:12:16 2017 -0800 anv: Define macro anv_debug() This is a printf-like macro that prints a debug message to stderr when built with DEBUG. If no DEBUG, then do nothing. Reviewed-by: Jason Ekstranad <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> --- src/intel/vulkan/anv_private.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 75f2bde..de50dff 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -199,9 +199,11 @@ VkResult __vk_errorf(VkResult error, const char *file, int line, const char *for #ifdef DEBUG #define vk_error(error) __vk_errorf(error, __FILE__, __LINE__, NULL); #define vk_errorf(error, format, ...) __vk_errorf(error, __FILE__, __LINE__, format, ## __VA_ARGS__); +#define anv_debug(format, ...) fprintf(stderr, "debug: " format, ##__VA_ARGS__) #else #define vk_error(error) error #define vk_errorf(error, format, ...) error +#define anv_debug(format, ...) #endif void __anv_finishme(const char *file, int line, const char *format, ...) _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
