diff options
| author | Charles Giessen <charles@lunarg.com> | 2025-07-07 10:35:10 -0500 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2025-07-07 11:34:37 -0500 |
| commit | 06ae73a3dc3a03466817d8370355203dac7b79b1 (patch) | |
| tree | dd483328c467bc3002911c9a6eae5ebcc7c4e259 /vulkaninfo/vulkaninfo.cpp | |
| parent | f0f308ad2cdc2e8fd58985d6230df4a29cc44eb6 (diff) | |
| download | usermoji-06ae73a3dc3a03466817d8370355203dac7b79b1.tar.xz | |
build: Update to header 1.4.321
Includes necessary changes for VK_KHR_surface_maintenance1
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 425172e9..c3c9f8cf 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -170,12 +170,17 @@ void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurf if (inst.CheckExtensionEnabled(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME)) { chain_iterator_surface_capabilities2(p, inst, gpu, surface.surface_capabilities2_khr.pNext); } - if (inst.CheckExtensionEnabled(VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME)) { + if (inst.CheckExtensionEnabled(VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME) || + inst.CheckExtensionEnabled(VK_KHR_SURFACE_MAINTENANCE_1_EXTENSION_NAME)) { + const char *surf_ext_name = VK_KHR_SURFACE_MAINTENANCE_1_EXTENSION_NAME; + if (!inst.CheckExtensionEnabled(VK_KHR_SURFACE_MAINTENANCE_1_EXTENSION_NAME)) { + surf_ext_name = VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME; + } p.SetSubHeader(); - ObjectWrapper obj(p, "VK_EXT_surface_maintenance1"); + ObjectWrapper obj(p, surf_ext_name); for (auto &mode : surface.surf_present_modes) { - VkSurfacePresentModeEXT present_mode{}; - present_mode.sType = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT; + VkSurfacePresentModeKHR present_mode{}; + present_mode.sType = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_KHR; present_mode.presentMode = mode; VkPhysicalDeviceSurfaceInfo2KHR surface_info{}; @@ -183,24 +188,24 @@ void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurf surface_info.surface = surface.surface_extension.surface; surface_info.pNext = &present_mode; - VkSurfacePresentModeCompatibilityEXT SurfacePresentModeCompatibilityEXT{}; - SurfacePresentModeCompatibilityEXT.sType = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT; + VkSurfacePresentModeCompatibilityKHR SurfacePresentModeCompatibilityKHR{}; + SurfacePresentModeCompatibilityKHR.sType = VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_KHR; - VkSurfacePresentScalingCapabilitiesEXT SurfacePresentScalingCapabilitiesEXT{}; - SurfacePresentScalingCapabilitiesEXT.sType = VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT; - SurfacePresentScalingCapabilitiesEXT.pNext = &SurfacePresentModeCompatibilityEXT; + VkSurfacePresentScalingCapabilitiesKHR SurfacePresentScalingCapabilitiesKHR{}; + SurfacePresentScalingCapabilitiesKHR.sType = VK_STRUCTURE_TYPE_SURFACE_PRESENT_SCALING_CAPABILITIES_EXT; + SurfacePresentScalingCapabilitiesKHR.pNext = &SurfacePresentModeCompatibilityKHR; VkSurfaceCapabilities2KHR surface_caps2{}; surface_caps2.sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR; - surface_caps2.pNext = &SurfacePresentScalingCapabilitiesEXT; + surface_caps2.pNext = &SurfacePresentScalingCapabilitiesKHR; VkResult err = vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu.phys_device, &surface_info, &surface_caps2); if (err != VK_SUCCESS) { continue; } - std::vector<VkPresentModeKHR> compatible_present_modes{SurfacePresentModeCompatibilityEXT.presentModeCount}; - SurfacePresentModeCompatibilityEXT.pPresentModes = compatible_present_modes.data(); + std::vector<VkPresentModeKHR> compatible_present_modes{SurfacePresentModeCompatibilityKHR.presentModeCount}; + SurfacePresentModeCompatibilityKHR.pPresentModes = compatible_present_modes.data(); err = vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu.phys_device, &surface_info, &surface_caps2); @@ -210,10 +215,10 @@ void DumpSurfaceCapabilities(Printer &p, AppInstance &inst, AppGpu &gpu, AppSurf p.PrintKeyValue("minImageCount", surface_caps2.surfaceCapabilities.minImageCount); p.PrintKeyValue("maxImageCount", surface_caps2.surfaceCapabilities.maxImageCount); - DumpVkSurfacePresentScalingCapabilitiesEXT(p, "VkSurfacePresentScalingCapabilitiesEXT", - SurfacePresentScalingCapabilitiesEXT); - DumpVkSurfacePresentModeCompatibilityEXT(p, "VkSurfacePresentModeCompatibilityEXT", - SurfacePresentModeCompatibilityEXT); + DumpVkSurfacePresentScalingCapabilitiesKHR(p, "VkSurfacePresentScalingCapabilitiesKHR", + SurfacePresentScalingCapabilitiesKHR); + DumpVkSurfacePresentModeCompatibilityKHR(p, "VkSurfacePresentModeCompatibilityKHR", + SurfacePresentModeCompatibilityKHR); } } } |
