X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fintel%2Fvulkan%2Fanv_util.c;h=3c1803aa05668fd6e8f36cef8f98dc9ccde893e4;hb=1e941a05283b6873d2501f17944e545f6c76166f;hp=ec61f7355ef693a8c572ebb6f77a6acff3f68aa5;hpb=d083bc1c4b162ae23495fd9236d5fba27c04075b;p=mesa.git diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c index ec61f7355ef..3c1803aa056 100644 --- a/src/intel/vulkan/anv_util.c +++ b/src/intel/vulkan/anv_util.c @@ -47,22 +47,7 @@ anv_loge(const char *format, ...) void anv_loge_v(const char *format, va_list va) { - fprintf(stderr, "vk: error: "); - vfprintf(stderr, format, va); - fprintf(stderr, "\n"); -} - -void anv_printflike(3, 4) -__anv_finishme(const char *file, int line, const char *format, ...) -{ - va_list ap; - char buffer[256]; - - va_start(ap, format); - vsnprintf(buffer, sizeof(buffer), format, ap); - va_end(ap); - - fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buffer); + intel_loge_v(format, va); } void anv_printflike(6, 7) @@ -80,16 +65,16 @@ __anv_perf_warn(struct anv_instance *instance, const void *object, snprintf(report, sizeof(report), "%s: %s", file, buffer); - anv_debug_report(instance, - VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - type, - (uint64_t) (uintptr_t) object, - line, - 0, - "anv", - report); + vk_debug_report(&instance->debug_report_callbacks, + VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, + type, + (uint64_t) (uintptr_t) object, + line, + 0, + "anv", + report); - fprintf(stderr, "%s:%d: PERF: %s\n", file, line, buffer); + intel_logw("%s:%d: PERF: %s", file, line, buffer); } VkResult @@ -114,16 +99,18 @@ __vk_errorf(struct anv_instance *instance, const void *object, snprintf(report, sizeof(report), "%s:%d: %s", file, line, error_str); } - anv_debug_report(instance, - VK_DEBUG_REPORT_ERROR_BIT_EXT, - type, - (uint64_t) (uintptr_t) object, - line, - 0, - "anv", - report); + if (instance) { + vk_debug_report(&instance->debug_report_callbacks, + VK_DEBUG_REPORT_ERROR_BIT_EXT, + type, + (uint64_t) (uintptr_t) object, + line, + 0, + "anv", + report); + } - fprintf(stderr, "%s\n", report); + intel_loge("%s", report); if (error == VK_ERROR_DEVICE_LOST && env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false))