diff --git a/drape/framebuffer.cpp b/drape/framebuffer.cpp index 2ff239b14f..72b6d098b3 100644 --- a/drape/framebuffer.cpp +++ b/drape/framebuffer.cpp @@ -21,6 +21,9 @@ Framebuffer::DepthStencil::~DepthStencil() void Framebuffer::DepthStencil::SetSize(ref_ptr context, uint32_t width, uint32_t height) { + if (m_texture && m_texture->GetWidth() == width && m_texture->GetHeight() == height) + return; + Destroy(); Texture::Params params; diff --git a/drape/vulkan/vulkan_base_context.cpp b/drape/vulkan/vulkan_base_context.cpp index e30e184142..5914aa2cd2 100644 --- a/drape/vulkan/vulkan_base_context.cpp +++ b/drape/vulkan/vulkan_base_context.cpp @@ -161,6 +161,12 @@ void VulkanBaseContext::SetRenderingQueue(VkQueue queue) void VulkanBaseContext::Resize(int w, int h) { + if (m_swapchain != VK_NULL_HANDLE && + m_surfaceCapabilities.currentExtent.width == static_cast(w) && + m_surfaceCapabilities.currentExtent.height == static_cast(h)) + { + return; + } m_surfaceCapabilities.currentExtent.width = static_cast(w); m_surfaceCapabilities.currentExtent.height = static_cast(h); RecreateSwapchainAndDependencies();