From d7e3d73efb5003c59227b38f6cb6160ec2e1f1ca Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 18 Oct 2024 20:21:00 +0100 Subject: [PATCH] vulkan: Only log the list of extensions if debugging is enabled Logging them with `g_print()` will write to stdout, which can interfere with machine-readable output, for example when gnome-control-center displays the GPU/driver name. Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/7093 Signed-off-by: Simon McVittie --- gdk/gdkvulkancontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c index 14700a90bc..d444326929 100644 --- a/gdk/gdkvulkancontext.c +++ b/gdk/gdkvulkancontext.c @@ -577,7 +577,7 @@ physical_device_supports_extension (VkPhysicalDevice device, { first = FALSE; for (uint32_t i = 0; i < n_device_extensions; i++) - g_print ("%s\n", extensions[i].extensionName); + GDK_DEBUG (VULKAN, "%s", extensions[i].extensionName); } for (uint32_t i = 0; i < n_device_extensions; i++)