aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan/vk_swapchain.h
AgeCommit message (Collapse)Author
2023-12-03renderer_vulkan: do not recreate swapchain for srgbLiam
2023-06-03android: vulkan: Recreate surface after suspension & adapt to async. ↵bunnei
presentation.
2023-05-02vk_swapchain: Use certain modes for unlockedlat9nq
Uses mailbox, then immediate for unlocked framerate depending on support for either. Also adds support for FIFO_RELAXED. This function now assumes vsync_mode was originially configured to a value that the driver supports. vk_swapchain: ChooseSwapPresentMode determines updates Simplifies swapchain a bit and allows us to change the present mode during guest runtime. vk_swapchain: Fix MSVC error vk_swapchain: Enforce available present modes Some frontends don't check the value of vsync_mode before comitting it. Just as well, since a driver update or misconfiguration could problems in the swap chain. vk_swapchain: Silence warnings Silences GCC warnings implicit-fallthrough and shadow, which apparently are not enabled on clang.
2023-05-01renderer_vulkan: Async presentationGPUCode
2022-12-13video_core/vulkan: Explicity check swapchain size when deciding to recreateAlexander Orzechowski
Vulkan for whatever reason does not return VK_ERROR_OUT_OF_DATE_KHR when the swapchain is the wrong size. Explicity make sure the size is indeed up to date to workaround this.
2022-06-26video_core: Replace VKSwapchain with Swapchaingerman77
2022-06-26video_core: Replace VKScheduler with Schedulergerman77
2022-04-23general: Convert source file copyright comments over to SPDXMorph
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2021-09-12vk_swapchain: Use immediate present mode when mailbox is unavailable and FPS ↵ameerj
is unlocked Allows drivers that do not support VK_PRESENT_MODE_MAILBOX_KHR the ability to present at a framerate higher than the monitor's refresh rate when the FPS is unlocked.
2021-09-11Merge pull request #6941 from ameerj/swapchain-srgbFernando S
vk_swapchain: Prefer linear swapchain format when presenting sRGB images
2021-09-02renderer_vulkan: Wait on present semaphore at queue submitameerj
The present semaphore is being signalled by the call to acquire the swapchain image. This semaphore is meant to be waited on when rendering to the swapchain image. Currently it is waited on when presenting, but moving its usage to be waited on in the command buffer submission allows for proper usage of this semaphore. Fixes the device lost when launching titles on the Intel Linux Mesa driver.
2021-08-29vk_swapchain: Prefer linear swapchain format when presenting sRGB imagesameerj
Fixes broken sRGB when presenting from a secondary GPU.
2021-07-22vk_swapchain: Handle outdated swapchainsReinUsesLisp
Fixes pixelated presentation on Intel devices.
2021-07-22vk_swapchain: Avoid recreating the swapchain on each frameReinUsesLisp
Recreate only when requested (or sRGB is changed) instead of tracking the frontend's size. That size is still used as a hint.
2021-07-22vk_scheduler: Allow command submission on worker threadReinUsesLisp
This changes how Scheduler::Flush works. It queues the current command buffer to be sent to the GPU but does not do it immediately. The Vulkan worker thread takes care of that. Users will have to use Scheduler::Flush + Scheduler::WaitWorker to get the previous behavior. Scheduler::Finish is unchanged. To avoid waiting on work never queued, Scheduler::Wait sends the current command buffer if that's what the caller wants to wait.
2021-04-11renderer_vulkan: Check return value of AcquireNextImageJoshua Ashton
We can get into a really bad state by ignoring this leading to device loss and using incorrect resources.
2021-02-13gpu: Report renderer errors with exceptionsReinUsesLisp
Instead of using a two step initialization to report errors, initialize the GPU renderer and rasterizer on the constructor and report errors through std::runtime_error.
2021-01-03renderer_vulkan: Rename VKDevice to DeviceReinUsesLisp
The "VK" prefix predates the "Vulkan" namespace. It was carried around the codebase for consistency. "VKDevice" currently is a bad alias with "VkDevice" (only an upcase character of difference) that can cause confusion. Rename all instances of it.
2020-12-31vulkan_common: Rename renderer_vulkan/wrapper.h to ↵ReinUsesLisp
vulkan_common/vulkan_wrapper.h Allows sharing Vulkan wrapper code between different rendering backends.
2020-09-19renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp
This reworks how host<->device synchronization works on the Vulkan backend. Instead of "protecting" resources with a fence and signalling these as free when the fence is known to be signalled by the host GPU, use timeline semaphores. Vulkan timeline semaphores allow use to work on a subset of D3D12 fences. As far as we are concerned, timeline semaphores are a value set by the host or the device that can be waited by either of them. Taking advantange of this, we can have a monolithically increasing atomic value for each submission to the graphics queue. Instead of protecting resources with a fence, we simply store the current logical tick (the atomic value stored in CPU memory). When we want to know if a resource is free, it can be compared to the current GPU tick. This greatly simplifies resource management code and the free status of resources should have less false negatives. To workaround bugs in validation layers, when these are attached there's a thread waiting for timeline semaphores.
2020-04-10renderer_vulkan: Drop Vulkan-HppReinUsesLisp
2020-01-20vk_blit_screen: Address feedbackReinUsesLisp
2019-12-06vk_swapchain: Add support for swapping sRGBReinUsesLisp
We don't know until the game is running if it's using an sRGB color space or not. Add support for hot-swapping swapchain surface formats.
2019-03-29vk_swapchain: Implement a swapchain managerReinUsesLisp