mirror of https://github.com/snes9xgit/snes9x.git
Vulkan: Check image extents for surface compatibility.
This commit is contained in:
parent
f45e22b08d
commit
5314bc8db0
|
@ -139,11 +139,15 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
|
||||||
swapchain_object.reset();
|
swapchain_object.reset();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (extents.width > 8192 || extents.height > 8192)
|
|
||||||
{
|
if (extents.width > surface_capabilities.maxImageExtent.width)
|
||||||
extents.width = 512;
|
extents.width = surface_capabilities.maxImageExtent.width;
|
||||||
extents.height = 512;
|
if (extents.height > surface_capabilities.maxImageExtent.height)
|
||||||
}
|
extents.height = surface_capabilities.maxImageExtent.height;
|
||||||
|
if (extents.width < surface_capabilities.minImageExtent.width)
|
||||||
|
extents.width = surface_capabilities.minImageExtent.width;
|
||||||
|
if (extents.height < surface_capabilities.minImageExtent.height)
|
||||||
|
extents.height = surface_capabilities.minImageExtent.height;
|
||||||
|
|
||||||
auto present_modes = physical_device.getSurfacePresentModesKHR(surface);
|
auto present_modes = physical_device.getSurfacePresentModesKHR(surface);
|
||||||
auto tearing_present_mode = vk::PresentModeKHR::eFifo;
|
auto tearing_present_mode = vk::PresentModeKHR::eFifo;
|
||||||
|
|
Loading…
Reference in New Issue