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.cpp | |
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.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index 821f44f1a..86a30dcd1 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -105,14 +105,14 @@ VkCompositeAlphaFlagBitsKHR ChooseAlphaFlags(const VkSurfaceCapabilitiesKHR& cap } // Anonymous namespace Swapchain::Swapchain(VkSurfaceKHR surface_, const Device& device_, Scheduler& scheduler_, - u32 width_, u32 height_, bool srgb) + u32 width_, u32 height_) : surface{surface_}, device{device_}, scheduler{scheduler_} { - Create(surface_, width_, height_, srgb); + Create(surface_, width_, height_); } Swapchain::~Swapchain() = default; -void Swapchain::Create(VkSurfaceKHR surface_, u32 width_, u32 height_, bool srgb) { +void Swapchain::Create(VkSurfaceKHR surface_, u32 width_, u32 height_) { is_outdated = false; is_suboptimal = false; width = width_; @@ -127,7 +127,7 @@ void Swapchain::Create(VkSurfaceKHR surface_, u32 width_, u32 height_, bool srgb Destroy(); - CreateSwapchain(capabilities, srgb); + CreateSwapchain(capabilities); CreateSemaphores(); resource_ticks.clear(); @@ -196,7 +196,7 @@ void Swapchain::Present(VkSemaphore render_semaphore) { } } -void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, bool srgb) { +void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) { const auto physical_device{device.GetPhysical()}; const auto formats{physical_device.GetSurfaceFormatsKHR(surface)}; const auto present_modes = physical_device.GetSurfacePresentModesKHR(surface); @@ -274,15 +274,14 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, bo swapchain = device.GetLogical().CreateSwapchainKHR(swapchain_ci); extent = swapchain_ci.imageExtent; - current_srgb = srgb; images = swapchain.GetImages(); image_count = static_cast<u32>(images.size()); #ifdef ANDROID // Android is already ordered the same as Switch. - image_view_format = srgb ? VK_FORMAT_R8G8B8A8_SRGB : VK_FORMAT_R8G8B8A8_UNORM; + image_view_format = VK_FORMAT_R8G8B8A8_UNORM; #else - image_view_format = srgb ? VK_FORMAT_B8G8R8A8_SRGB : VK_FORMAT_B8G8R8A8_UNORM; + image_view_format = VK_FORMAT_B8G8R8A8_UNORM; #endif } |