diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-06-03 17:42:24 -0300 |
|---|---|---|
| committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 21:51:34 -0400 |
| commit | f45f7b5c2a869123340591cec6db58c33a5fd3ab (patch) | |
| tree | 89fbd0df48bc24f3c3e9996ce4f88402debf6e77 /src/video_core/renderer_vulkan/vk_swapchain.h | |
| parent | 562af301819227d65a251a2c29c997bf798da7ba (diff) | |
vk_swapchain: Handle outdated swapchains
Fixes pixelated presentation on Intel devices.
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_swapchain.h')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h index df6da3d93..35c2cdc14 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.h +++ b/src/video_core/renderer_vulkan/vk_swapchain.h @@ -38,9 +38,14 @@ public: return current_srgb != is_srgb; } - /// Returns true when the image has to be recreated. - bool NeedsRecreate() const { - return needs_recreate; + /// Returns true when the swapchain is outdated. + bool IsOutDated() const { + return is_outdated; + } + + /// Returns true when the swapchain is suboptimal. + bool IsSubOptimal() const { + return is_suboptimal; } VkExtent2D GetSize() const { @@ -95,7 +100,8 @@ private: VkExtent2D extent{}; bool current_srgb{}; - bool needs_recreate{}; + bool is_outdated{}; + bool is_suboptimal{}; }; } // namespace Vulkan |
