From ad27db2ae99a1d61152699490dbec6e2f2c19aa0 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 24 Sep 2021 15:38:40 -0500 Subject: [PATCH] vulkan/log: Drop _impl from the log helper names Now that we no longer have every driver in the tree defining their own __vk_errorf and __vk_errorv, we don't need to worry about the symbol collision anymore and can use the "real" names for the common ones. Tested-by: Boris Brezillon Reviewed-By: Mike Blumenkrantz Part-of: --- src/vulkan/util/vk_log.c | 14 +++++++------- src/vulkan/util/vk_log.h | 24 ++++++++---------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/vulkan/util/vk_log.c b/src/vulkan/util/vk_log.c index 218be34de03..abea4f4352a 100644 --- a/src/vulkan/util/vk_log.c +++ b/src/vulkan/util/vk_log.c @@ -274,9 +274,9 @@ vk_object_for_error(struct vk_object_base *obj, VkResult error) } VkResult -__vk_errorv_impl(const void *_obj, VkResult error, - const char *file, int line, - const char *format, va_list va) +__vk_errorv(const void *_obj, VkResult error, + const char *file, int line, + const char *format, va_list va) { struct vk_object_base *object = (struct vk_object_base *)_obj; struct vk_instance *instance = vk_object_to_instance(object); @@ -324,14 +324,14 @@ __vk_errorv_impl(const void *_obj, VkResult error, } VkResult -__vk_errorf_impl(const void *_obj, VkResult error, - const char *file, int line, - const char *format, ...) +__vk_errorf(const void *_obj, VkResult error, + const char *file, int line, + const char *format, ...) { va_list va; va_start(va, format); - VkResult result = __vk_errorv_impl(_obj, error, file, line, format, va); + VkResult result = __vk_errorv(_obj, error, file, line, format, va); va_end(va); return result; diff --git a/src/vulkan/util/vk_log.h b/src/vulkan/util/vk_log.h index 9192d4b1ef1..3f6a127e496 100644 --- a/src/vulkan/util/vk_log.h +++ b/src/vulkan/util/vk_log.h @@ -73,25 +73,17 @@ __vk_log_impl(VkDebugUtilsMessageSeverityFlagBitsEXT severity, ...); #define vk_error(obj, error) \ - __vk_errorf_impl(obj, error, __FILE__, __LINE__, NULL) + __vk_errorf(obj, error, __FILE__, __LINE__, NULL) #define vk_errorf(obj, error, ...) \ - __vk_errorf_impl(obj, error, __FILE__, __LINE__, __VA_ARGS__) - -/* For now, the function is named __vk_errorf_impl and we use a macro to - * re-name it for any drivers which include this header. This is to prevent - * linking errors while we do the rework. We'll drop it once everyone is - * using the common log function. - */ -#define __vk_errorf(...) __vk_errorf_impl(__VA_ARGS__) -#define __vk_errorv(...) __vk_errorv_impl(__VA_ARGS__) + __vk_errorf(obj, error, __FILE__, __LINE__, __VA_ARGS__) VkResult -__vk_errorv_impl(const void *_obj, VkResult error, - const char *file, int line, - const char *format, va_list va); +__vk_errorv(const void *_obj, VkResult error, + const char *file, int line, + const char *format, va_list va); VkResult PRINTFLIKE(5, 6) -__vk_errorf_impl(const void *_obj, VkResult error, - const char *file, int line, - const char *format, ...); +__vk_errorf(const void *_obj, VkResult error, + const char *file, int line, + const char *format, ...);