diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-03 22:42:24 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:34 +0200 |
commit | f45f7b5c2a869123340591cec6db58c33a5fd3ab (patch) | |
tree | 89fbd0df48bc24f3c3e9996ce4f88402debf6e77 /src/video_core/renderer_vulkan/renderer_vulkan.cpp | |
parent | shader: Fix VertexA Shaders. (diff) | |
download | yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.tar yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.tar.gz yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.tar.bz2 yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.tar.lz yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.tar.xz yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.tar.zst yuzu-f45f7b5c2a869123340591cec6db58c33a5fd3ab.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/renderer_vulkan.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/renderer_vulkan.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 54c41bcaf..6fda06a7e 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -143,18 +143,17 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { const Layout::FramebufferLayout layout = render_window.GetFramebufferLayout(); swapchain.Create(layout.width, layout.height, is_srgb); }; - if (swapchain.NeedsRecreate() || swapchain.HasColorSpaceChanged(is_srgb)) { + if (swapchain.IsSubOptimal() || swapchain.HasColorSpaceChanged(is_srgb)) { recreate_swapchain(); } - bool needs_recreate; + bool is_outdated; do { - needs_recreate = false; swapchain.AcquireNextImage(); - if (swapchain.NeedsRecreate()) { + is_outdated = swapchain.IsOutDated(); + if (is_outdated) { recreate_swapchain(); - needs_recreate = true; } - } while (needs_recreate); + } while (is_outdated); if (has_been_recreated) { blit_screen.Recreate(); } |