From 6eac1cefd9e129759e5ca046f4162799e2a45a6d Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 5 Sep 2025 11:59:39 -0400 Subject: [PATCH] vulkan/wsi/x11: Use mesa_logX() instead of fprintf() We have a logging framework. We should use it. This way we can shut these warnings off in CI if we want to. Acked-by: Mike Blumenkrantz Reviewed-by: Eric Engestrom Part-of: --- src/vulkan/wsi/wsi_common_x11.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 67743645506..2cd023dadcf 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -401,13 +401,13 @@ wsi_x11_connection_destroy(struct wsi_device *wsi_dev, static bool wsi_x11_check_for_dri3(struct wsi_x11_connection *wsi_conn) { - if (wsi_conn->has_dri3) - return true; - if (!wsi_conn->is_proprietary_x11) { - fprintf(stderr, "vulkan: No DRI3 support detected - required for presentation\n" - "Note: you can probably enable DRI3 in your Xorg config\n"); - } - return false; + if (wsi_conn->has_dri3) + return true; + if (!wsi_conn->is_proprietary_x11) { + mesa_logi("vulkan: No DRI3 support detected - required for presentation\n" + "Note: you can probably enable DRI3 in your Xorg config\n"); + } + return false; } /** @@ -1239,8 +1239,8 @@ _x11_swapchain_result(struct x11_swapchain *chain, VkResult result, /* If we have a new error, mark it as permanent on the chain and return. */ if (result < 0) { #ifndef NDEBUG - fprintf(stderr, "%s:%d: Swapchain status changed to %s\n", - file, line, vk_Result_to_str(result)); + mesa_logd("%s:%d: Swapchain status changed to %s\n", + file, line, vk_Result_to_str(result)); #endif chain->status = result; return result; @@ -1256,8 +1256,8 @@ _x11_swapchain_result(struct x11_swapchain *chain, VkResult result, if (result == VK_SUBOPTIMAL_KHR) { #ifndef NDEBUG if (chain->status != VK_SUBOPTIMAL_KHR) { - fprintf(stderr, "%s:%d: Swapchain status changed to %s\n", - file, line, vk_Result_to_str(result)); + mesa_logd("%s:%d: Swapchain status changed to %s\n", + file, line, vk_Result_to_str(result)); } #endif chain->status = result;