From 1b96828667e14a48d4a7f421133de206a8b48e84 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 21 Sep 2022 20:49:53 -0400 Subject: Make vulkan-validate always available There is no need to restrict this debug builds. --- gdk/gdk.c | 2 +- gdk/gdkvulkancontext.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdk/gdk.c b/gdk/gdk.c index 4d3e4eb5b6..8b7c52769c 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -128,7 +128,7 @@ static const GdkDebugKey gdk_debug_keys[] = { { "gl-glx", GDK_DEBUG_GL_GLX, "Use GLX on X11" }, { "gl-wgl", GDK_DEBUG_GL_WGL, "Use WGL on Windows" }, { "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE, "Disable Vulkan support" }, - { "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" }, + { "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer", TRUE }, { "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings", TRUE }, { "high-depth", GDK_DEBUG_HIGH_DEPTH, "Use high bit depth rendering if possible", TRUE }, }; diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c index 1f464cea95..b3549a9413 100644 --- a/gdk/gdkvulkancontext.c +++ b/gdk/gdkvulkancontext.c @@ -1072,7 +1072,7 @@ gdk_display_create_vulkan_instance (GdkDisplay *display, VK_VERSION_MINOR (layers[i].specVersion), VK_VERSION_PATCH (layers[i].specVersion), layers[i].description); - if (GDK_DISPLAY_DEBUG_CHECK (display, VULKAN_VALIDATE) && + if ((gdk_display_get_debug_flags (display) & GDK_DEBUG_VULKAN_VALIDATE) && g_str_equal (layers[i].layerName, "VK_LAYER_LUNARG_standard_validation")) { g_ptr_array_add (used_layers, (gpointer) "VK_LAYER_LUNARG_standard_validation"); @@ -1080,7 +1080,7 @@ gdk_display_create_vulkan_instance (GdkDisplay *display, } } - if (GDK_DISPLAY_DEBUG_CHECK (display, VULKAN_VALIDATE) && !validate) + if ((gdk_display_get_debug_flags (display) & GDK_DEBUG_VULKAN_VALIDATE) && !validate) { g_warning ("Vulkan validation layers were requested, but not found. Running without."); } -- cgit v1.2.1