summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_util.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-10-26 08:24:49 -0500
committerJason Ekstrand <[email protected]>2018-10-26 13:27:21 -0500
commitade22ae1ace051422b972ef057e57aab6fdfa024 (patch)
tree4e979b104efaf7821e7314fb0eb76778c179f6fa /src/intel/vulkan/anv_util.c
parentd6be0b5556ceb40a24b0a89ff86e909514d60a52 (diff)
anv/util: Split a vk_errorv helper out of vk_errorf
Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
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;
+}