This commit is contained in:
Mars 2024-10-06 16:19:29 -04:00
parent e3cc2bd8f3
commit 6711f4b6e0
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895

View file

@ -702,10 +702,12 @@ class VulkanApp {
u32 width = 0, height = 0;
std::tie(width, height) = mWindow->getFramebufferSize();
vk::Extent2D actualExtent = {
std::clamp(actualExtent.width, capabilities.minImageExtent.width, capabilities.maxImageExtent.width),
std::clamp(actualExtent.height, capabilities.minImageExtent.height, capabilities.maxImageExtent.height)
};
vk::Extent2D actualExtent = { width, height };
actualExtent.width =
std::clamp(actualExtent.width, capabilities.minImageExtent.width, capabilities.maxImageExtent.width);
actualExtent.height =
std::clamp(actualExtent.height, capabilities.minImageExtent.height, capabilities.maxImageExtent.height);
return actualExtent;
}