summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/wrapper.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-10-28video_core: Enforce -Wredundant-move and -Wpessimizing-moveReinUsesLisp1-1/+1
Silence three warnings and make them errors to avoid introducing more in the future.
2020-10-07renderer_vulkan/wrapper: Fix physical device sortingReinUsesLisp1-13/+35
The old code had a sort function that was invalid and it didn't work as expected when the base vector had a different order (e.g. renderdoc was attached). This sorts devices as expected and fixes a debug assert on MSVC.
2020-09-19renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp1-1/+6
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-09-16video_core: Enforce -Werror=switchReinUsesLisp1-0/+16
This forces us to fix all -Wswitch warnings in video_core.
2020-08-20renderer_vulkan: Create a Vulkan 1.0 instance when 1.1 is not availableReinUsesLisp1-4/+19
This commit doesn't make yuzu compatible with Vulkan 1.0 yet, it only creates an 1.0 instance.
2020-08-16Vk Async pipeline compilationameerj1-1/+1
2020-08-14vulkan/wrapper: Avoid unnecessary copy in EnumerateInstanceExtensionProperties()Lioncash1-1/+1
Given this is implicitly creating a std::optional, we can move the vector into it.
2020-07-17wrapper: Make use of designated initializers where applicableLioncash1-56/+64
2020-06-27renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functionsReinUsesLisp1-0/+10
2020-06-22renderer_vulkan: Update validation layer name and test before enablingReinUsesLisp1-1/+15
Update validation layer string to VK_LAYER_KHRONOS_validation. While we are at it, properly check for available validation layers before enabling them.
2020-06-20vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()Lioncash1-2/+1
Check() can throw an exception if the Vulkan result isn't successful. We remove the check so that std::terminate isn't outright called and allows for better debugging (should it ever actually fail).
2020-04-28{maxwell_3d,buffer_cache}: Implement memory barriers using 3D registersReinUsesLisp1-0/+1
Drop MemoryBarrier from the buffer cache and use Maxwell3D's register WaitForIdle. To implement this on OpenGL we just call glMemoryBarrier with the necessary bits. Vulkan lacks this synchronization primitive, so we set an event and immediately wait for it. This is not a pretty solution, but it's what Vulkan can do without submitting the current command buffer to the queue (which ends up being more expensive on the CPU).
2020-04-22vk_fence_manager: Initial implementationReinUsesLisp1-0/+18
2020-04-19vulkan/wrapper: Sort physical devicesReinUsesLisp1-1/+20
Sort discrete GPUs over the rest, Nvidia over AMD, AMD over Intel, Intel over the rest. This gives us a somewhat consistent order when Optimus is removed (renderdoc does this when it's attached). This can break the configuration of users with an Intel GPU that manually remove Optimus on yuzu. That said, it's a very unlikely to happen.
2020-04-14renderer_vulkan: Integrate Nvidia Nsight Aftermath on WindowsReinUsesLisp1-3/+2
Adds optional support for Nsight Aftermath. It is enabled through ENABLE_NSIGHT_AFTERMATH in cmake. A path to the SDK has to be provided by the environment variable NSIGHT_AFTERMATH_SDK. Nsight Aftermath allows an application to generate "minidumps" of the GPU state when a device loss happens. By analysing these on Nsight we can know what a game was doing and why it triggered a device loss. The dump is generated inside %APPDATA%\yuzu\log\gpucrash and this directory is deleted every time a new instance is initialized with Nsight enabled. To enable it on yuzu there has a to be a driver and device capable of running Nsight Aftermath on Vulkan. That means only Turing based GPUs on the latest stable driver, beta drivers won't work for now. It is manually enabled in Configuration>Debug>Enable Graphics Debugging because when using all debugging capabilities there is a runtime cost.
2020-04-13renderer_vulkan: Remove Nvidia checkpointsReinUsesLisp1-13/+0
2020-04-01renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapperReinUsesLisp1-0/+14
2020-04-01renderer_vulkan/wrapper: Add physical device handleReinUsesLisp1-0/+83
2020-04-01renderer_vulkan/wrapper: Add device handleReinUsesLisp1-0/+182
2020-04-01renderer_vulkan/wrapper: Add swapchain handleReinUsesLisp1-0/+8
2020-04-01renderer_vulkan/wrapper: Add pool handlesReinUsesLisp1-0/+32
2020-04-01renderer_vulkan/wrapper: Add buffer and image handlesReinUsesLisp1-0/+8
2020-04-01renderer_vulkan/wrapper: Add queue handleReinUsesLisp1-0/+11
2020-04-01renderer_vulkan/wrapper: Add instance handleReinUsesLisp1-0/+70
2020-03-27renderer_vulkan/wrapper: Add destroy and free overload setReinUsesLisp1-0/+105
2020-03-27renderer_vulkan/wrapper: Add dispatch table and loadersReinUsesLisp1-0/+146
2020-03-27renderer_vulkan/wrapper: Add exception classReinUsesLisp1-0/+4
2020-03-27renderer_vulkan/wrapper: Add ToString function for VkResultReinUsesLisp1-0/+87