summaryrefslogtreecommitdiffstats
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.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index 4b916e27f2c..45ce0a3aa0e 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -65,16 +65,30 @@ __anv_finishme(const char *file, int line, const char *format, ...)
fprintf(stderr, "%s:%d: FINISHME: %s\n", file, line, buffer);
}
-void anv_printflike(3, 4)
-__anv_perf_warn(const char *file, int line, const char *format, ...)
+void anv_printflike(6, 7)
+__anv_perf_warn(struct anv_instance *instance, const void *object,
+ VkDebugReportObjectTypeEXT type,
+ const char *file, int line, const char *format, ...)
{
va_list ap;
char buffer[256];
+ char report[256];
va_start(ap, format);
vsnprintf(buffer, sizeof(buffer), format, ap);
va_end(ap);
+ 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);
+
fprintf(stderr, "%s:%d: PERF: %s\n", file, line, buffer);
}