From 2020cec4111c87d85b167d583180b839f0c736c5 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Fri, 27 Sep 2024 14:56:00 -0500 Subject: [PATCH] vulkaninfo: Move variable declaration closer to use --- vulkaninfo/vulkaninfo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vulkaninfo/vulkaninfo.h b/vulkaninfo/vulkaninfo.h index 815d24e0b..61540559f 100644 --- a/vulkaninfo/vulkaninfo.h +++ b/vulkaninfo/vulkaninfo.h @@ -1194,10 +1194,10 @@ class AppSurface { surf_present_modes = GetVector("vkGetPhysicalDeviceSurfacePresentModesKHR", vkGetPhysicalDeviceSurfacePresentModesKHR, phys_device, surface_extension.surface); - const VkPhysicalDeviceSurfaceInfo2KHR surface_info2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, - surface_extension.surface}; if (inst.CheckExtensionEnabled(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME)) { + const VkPhysicalDeviceSurfaceInfo2KHR surface_info2 = {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, nullptr, + surface_extension.surface}; VkSurfaceFormat2KHR init{}; init.sType = VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR; surf_formats2 = GetVectorInit(