diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2022-12-13 19:08:02 +0100 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2022-12-13 19:23:35 +0100 |
commit | 3cc3176ad6549c412f2370f496f00f1f6849275c (patch) | |
tree | 33c90504a36af40b42080df1822e909a8399373f /src/video_core/renderer_vulkan/vk_swapchain.cpp | |
parent | renderer_opengl: refactor context acquire (diff) | |
download | yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.tar yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.tar.gz yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.tar.bz2 yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.tar.lz yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.tar.xz yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.tar.zst yuzu-3cc3176ad6549c412f2370f496f00f1f6849275c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index d7be417f5..b6810eef9 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -67,17 +67,19 @@ VkExtent2D ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, u32 wi } // Anonymous namespace -Swapchain::Swapchain(VkSurfaceKHR surface_, const Device& device_, Scheduler& scheduler_, u32 width, - u32 height, bool srgb) +Swapchain::Swapchain(VkSurfaceKHR surface_, const Device& device_, Scheduler& scheduler_, + u32 width_, u32 height_, bool srgb) : surface{surface_}, device{device_}, scheduler{scheduler_} { - Create(width, height, srgb); + Create(width_, height_, srgb); } Swapchain::~Swapchain() = default; -void Swapchain::Create(u32 width, u32 height, bool srgb) { +void Swapchain::Create(u32 width_, u32 height_, bool srgb) { is_outdated = false; is_suboptimal = false; + width = width_; + height = height_; const auto physical_device = device.GetPhysical(); const auto capabilities{physical_device.GetSurfaceCapabilitiesKHR(surface)}; @@ -88,7 +90,7 @@ void Swapchain::Create(u32 width, u32 height, bool srgb) { device.GetLogical().WaitIdle(); Destroy(); - CreateSwapchain(capabilities, width, height, srgb); + CreateSwapchain(capabilities, srgb); CreateSemaphores(); CreateImageViews(); @@ -148,8 +150,7 @@ void Swapchain::Present(VkSemaphore render_semaphore) { } } -void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, u32 width, u32 height, - bool srgb) { +void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities, bool srgb) { const auto physical_device{device.GetPhysical()}; const auto formats{physical_device.GetSurfaceFormatsKHR(surface)}; const auto present_modes{physical_device.GetSurfacePresentModesKHR(surface)}; |