Skip to content

Commit

Permalink
Remove some dead code in WSI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Jan 16, 2024
1 parent d307e42 commit 6ca8911
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions vulkan/wsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1115,25 +1115,19 @@ static bool init_surface_info(Device &device, WSIPlatform &platform,
// First, query minImageCount without any present mode.
// Avoid opting for present mode compat that is pathological in nature,
// e.g. Xorg MAILBOX where minImageCount shoots up to 5 for stupid reasons.
uint32_t baseline_image_count;
if (ext.supports_surface_capabilities2)
{
VkSurfaceCapabilities2KHR surface_capabilities2 = { VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR };
if (vkGetPhysicalDeviceSurfaceCapabilities2KHR(gpu, &info.surface_info, &surface_capabilities2) != VK_SUCCESS)
return false;
info.surface_capabilities = surface_capabilities2.surfaceCapabilities;
baseline_image_count = surface_capabilities2.surfaceCapabilities.minImageCount;
}
else
{
if (vkGetPhysicalDeviceSurfaceCapabilitiesKHR(gpu, surface, &info.surface_capabilities) != VK_SUCCESS)
return false;
baseline_image_count = info.surface_capabilities.minImageCount;
}

// Do not exceed this limit when selecting compatible present modes.
baseline_image_count = std::max(3u, baseline_image_count);

// Make sure we query surface caps tied to the present mode for correct results.
if (ext.swapchain_maintenance1_features.swapchainMaintenance1 &&
ext.supports_surface_capabilities2)
Expand Down

0 comments on commit 6ca8911

Please sign in to comment.