From ebe94d490378b903c6b6de3c34b1d3c0c3507ce8 Mon Sep 17 00:00:00 2001 From: Michael Cheng Date: Sat, 21 Mar 2026 10:37:46 -0700 Subject: [PATCH] anv: enable perf warning logging in release builds Call process_intel_debug_variable() early in anv_CreateInstance() so the intel_debug bitset is populated, then set enable_debug_logging when INTEL_DEBUG=perf is active. This makes anv_perf_warn() messages visible in non-debug builds. Signed-off-by: Michael Cheng Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_instance.c | 3 +++ src/intel/vulkan/anv_physical_device.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/vulkan/anv_instance.c b/src/intel/vulkan/anv_instance.c index 1c9c57b15f0..0a3b43522ce 100644 --- a/src/intel/vulkan/anv_instance.c +++ b/src/intel/vulkan/anv_instance.c @@ -327,6 +327,9 @@ VkResult anv_CreateInstance( instance->debug = parse_debug_string(os_get_option("ANV_DEBUG"), debug_control); + process_intel_debug_variable(); + instance->vk.enable_debug_logging = INTEL_DEBUG(DEBUG_PERF); + intel_driver_ds_init(); *pInstance = anv_instance_to_handle(instance); diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index 8b9d4bc561e..802c081b579 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -2639,8 +2639,6 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, int master_fd = -1; int ret; - process_intel_debug_variable(); - fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) { if (errno == ENOMEM) {