aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan/anv_util.c')
-rw-r--r--src/intel/vulkan/anv_util.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index 8ccb61b35c1..1159ccecc6a 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -77,20 +77,17 @@ __anv_perf_warn(struct anv_instance *instance, const void *object,
}
VkResult
-__vk_errorf(struct anv_instance *instance, const void *object,
- VkDebugReportObjectTypeEXT type, VkResult error,
- const char *file, int line, const char *format, ...)
+__vk_errorv(struct anv_instance *instance, const void *object,
+ VkDebugReportObjectTypeEXT type, VkResult error,
+ const char *file, int line, const char *format, va_list ap)
{
- va_list ap;
char buffer[256];
char report[512];
const char *error_str = vk_Result_to_str(error);
if (format) {
- va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
- va_end(ap);
snprintf(report, sizeof(report), "%s:%d: %s (%s)", file, line, buffer,
error_str);
@@ -113,3 +110,17 @@ __vk_errorf(struct anv_instance *instance, const void *object,
return error;
}
+
+VkResult
+__vk_errorf(struct anv_instance *instance, const void *object,
+ VkDebugReportObjectTypeEXT type, VkResult error,
+ const char *file, int line, const char *format, ...)
+{
+ va_list ap;
+
+ va_start(ap, format);
+ __vk_errorv(instance, object, type, error, file, line, format, ap);
+ va_end(ap);
+
+ return error;
+}