mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-23 03:45:30 +00:00
Vulkan: Only recreate swapchain if the frame is bigger than the swap image.
This commit is contained in:
parent
d07397931a
commit
737e6e531c
|
@ -683,7 +683,8 @@ public:
|
|||
} else {
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) {
|
|||
// to account for that.
|
||||
const bool is_suboptimal = swapchain.NeedsRecreation();
|
||||
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) {
|
||||
RecreateSwapchain(frame);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue