diff options
author | Liam <byteslice@airmail.cc> | 2023-12-03 20:02:20 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-12-03 22:43:54 +0100 |
commit | 382cf087a09e1095f07c14aabc8e432ec0a1a2c1 (patch) | |
tree | d028d018e39466e041992d2aad804914355758ae /src/video_core/renderer_vulkan/vk_swapchain.h | |
parent | Merge pull request #12094 from ameerj/gl-buffer-cache-batch-vtx (diff) | |
download | yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.tar yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.tar.gz yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.tar.bz2 yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.tar.lz yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.tar.xz yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.tar.zst yuzu-382cf087a09e1095f07c14aabc8e432ec0a1a2c1.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_swapchain.h')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h index b8a1465a6..d264f06e4 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.h +++ b/src/video_core/renderer_vulkan/vk_swapchain.h @@ -20,11 +20,11 @@ class Scheduler; class Swapchain { public: explicit Swapchain(VkSurfaceKHR surface, const Device& device, Scheduler& scheduler, u32 width, - u32 height, bool srgb); + u32 height); ~Swapchain(); /// Creates (or recreates) the swapchain with a given size. - void Create(VkSurfaceKHR surface, u32 width, u32 height, bool srgb); + void Create(VkSurfaceKHR surface, u32 width, u32 height); /// Acquires the next image in the swapchain, waits as needed. bool AcquireNextImage(); @@ -33,13 +33,8 @@ public: void Present(VkSemaphore render_semaphore); /// Returns true when the swapchain needs to be recreated. - bool NeedsRecreation(bool is_srgb) const { - return HasColorSpaceChanged(is_srgb) || IsSubOptimal() || NeedsPresentModeUpdate(); - } - - /// Returns true when the color space has changed. - bool HasColorSpaceChanged(bool is_srgb) const { - return current_srgb != is_srgb; + bool NeedsRecreation() const { + return IsSubOptimal() || NeedsPresentModeUpdate(); } /// Returns true when the swapchain is outdated. @@ -52,11 +47,6 @@ public: return is_suboptimal; } - /// Returns true when the swapchain format is in the srgb color space - bool IsSrgb() const { - return current_srgb; - } - VkExtent2D GetSize() const { return extent; } @@ -110,7 +100,7 @@ public: } private: - void CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, bool srgb); + void CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities); void CreateSemaphores(); void CreateImageViews(); @@ -144,7 +134,6 @@ private: bool has_mailbox{false}; bool has_fifo_relaxed{false}; - bool current_srgb{}; bool is_outdated{}; bool is_suboptimal{}; }; |