Skip to content
Snippets Groups Projects
Commit 737e6e53 authored by Fernando Sahmkow's avatar Fernando Sahmkow
Browse files

Vulkan: Only recreate swapchain if the frame is bigger than the swap image.

parent d0739793
No related branches found
No related tags found
No related merge requests found
...@@ -683,7 +683,8 @@ public: ...@@ -683,7 +683,8 @@ public:
} else { } else {
this->m_memory.WriteBlockUnsafe(this->m_addr, this->data(), this->size_bytes()); this->m_memory.WriteBlockUnsafe(this->m_addr, this->data(), this->size_bytes());
} }
} else if constexpr ((FLAGS & GuestMemoryFlags::Safe) || (FLAGS & GuestMemoryFlags::Cached)) { } else if constexpr ((FLAGS & GuestMemoryFlags::Safe) ||
(FLAGS & GuestMemoryFlags::Cached)) {
this->m_memory.InvalidateRegion(this->m_addr, this->size_bytes()); this->m_memory.InvalidateRegion(this->m_addr, this->size_bytes());
} }
} }
......
...@@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) { ...@@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) {
// to account for that. // to account for that.
const bool is_suboptimal = swapchain.NeedsRecreation(); const bool is_suboptimal = swapchain.NeedsRecreation();
const bool size_changed = const bool size_changed =
swapchain.GetWidth() != frame->width || swapchain.GetHeight() != frame->height; swapchain.GetWidth() < frame->width || swapchain.GetHeight() < frame->height;
if (is_suboptimal || size_changed) { if (is_suboptimal || size_changed) {
RecreateSwapchain(frame); RecreateSwapchain(frame);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment