summaryrefslogtreecommitdiffstats
path: root/src/video_core/vulkan_common/vulkan_wrapper.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-10-03vk_present_manager: recreate surface on any surface lossLiam1-0/+3
2023-09-23Macro HLE: Add DrawIndirectByteCountFernando Sahmkow1-0/+8
2023-09-23Query Cachge: Fully rework Vulkan's query cacheFernando Sahmkow1-0/+19
2023-09-16Vulkan: Implement Depth Bias ControlFernando Sahmkow1-0/+13
2023-08-27VideoCore: Implement DispatchIndirectFernando Sahmkow1-0/+5
2023-08-02vulkan: centralize configAlexandre Bouvier1-8/+0
2023-07-31vma: enable options everywhereAlexandre Bouvier1-9/+2
2023-07-01vulkan: Use newer VK_EXT_metal_surface to create surface for MoltenVK.Steveice101-0/+2
2023-06-28renderer_vulkan: Add suport for debug report callbackGPUCode1-0/+9
2023-06-18renderer_vulkan: Use VMA for buffersGPUCode1-13/+78
2023-06-18renderer_vulkan: Use VMA for imagesGPUCode1-13/+57
2023-03-12general: fix spelling mistakesLiam1-7/+7
2023-01-10vulkan_common: fix indirect draw with countLiam1-6/+6
2023-01-05video_core/vulkan: Added `VkPipelineCache` to store Vulkan pipelinesWollnashorn1-2/+22
As an optional feature which can be enabled in the advanced graphics configuration, all pipelines that get built at the initial shader loading are stored in a VkPipelineCache object and are dumped to the disk. These vendor specific pipeline cache files are located at `/shader/GAME_ID/vulkan_pipelines.bin`. This feature was mainly added because of an issue with the AMD driver (see yuzu-emu#8507) causing invalidation of the cache files the driver builds automatically.
2023-01-01MacroHLE: Final cleanup and fixes.Fernando Sahmkow1-1/+2
2023-01-01Vulkan: Implement Dynamic State 3Fernando Sahmkow1-0/+25
2023-01-01Vulkan Implement Dynamic State 2 LogicOp and PatchVerticesFernando Sahmkow1-0/+10
2023-01-01Vulkan: Implement Dynamic States 2Fernando Sahmkow1-0/+15
2023-01-01MacroHLE: Implement DrawIndexedIndirect & DrawArraysIndirect.Fernando Sahmkow1-6/+18
2023-01-01MacroHLE: Add MultidrawIndirect HLE Macro.Fernando Sahmkow1-0/+15
2022-12-08video_core: Integrate SMAALiam1-0/+6
Co-authored-by: goldenx86 <goldenx86@users.noreply.github.com> Co-authored-by: BreadFish64 <breadfish64@users.noreply.github.com>
2022-12-04vulkan_common: clean up extension usageLiam1-4/+7
2022-12-04vulkan_common: promote host query reset usage to coreLiam1-3/+3
2022-12-04vulkan_common: promote descriptor update template usage to coreLiam1-10/+10
2022-12-04vulkan_common: promote timeline semaphore usage to coreLiam1-6/+6
2022-10-06vulkan_blitter: Fix pool allocation double free.Byte1-20/+0
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
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.
2022-03-25Garbage Collection: Redesign the algorithm to do a better use of memory.Fernando Sahmkow1-1/+3
2022-03-19video_core: Reduce unused includesameerj1-1/+0
2021-07-28renderer_vulkan: Add setting to log pipeline statisticsReinUsesLisp1-0/+8
Use VK_KHR_pipeline_executable_properties when enabled and available to log statistics about the pipeline cache in a game. For example, this is on Turing GPUs when generating a pipeline cache from Super Smash Bros. Ultimate: Average pipeline statistics ========================================== Code size: 6433.167 Register count: 32.939 More advanced results could be presented, at the moment it's just an average of all 3D and compute pipelines.
2021-07-23vk_graphics_pipeline: Implement line widthReinUsesLisp1-0/+5
2021-07-23vk_graphics_pipeline: Use VK_KHR_push_descriptor when availableReinUsesLisp1-12/+19
~51% faster on Nvidia compared to previous method.
2021-07-23vulkan: Add VK_EXT_vertex_input_dynamic_state supportReinUsesLisp1-0/+8
Reduces the number of total pipelines generated on Vulkan. Tested on Super Smash Bros. Ultimate.
2021-02-13vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp1-2/+3
This uses a ring buffer similar to OpenGL's stream buffer for small uploads. This stops us from allocating several small buffers, reducing memory fragmentation and cache locality. It uses dedicated allocations when possible.
2021-02-13vulkan_wrapper: Add memory barrier pipeline barrier helperReinUsesLisp1-0/+6
2021-02-13vulkan_wrapper: Add interop functionsReinUsesLisp1-1/+11
2021-02-13vulkan_wrapper: Pull Windows symbolsReinUsesLisp1-0/+11
2021-02-13gpu: Report renderer errors with exceptionsReinUsesLisp1-0/+3
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-15vulkan_common: Silence missing initializer warningsReinUsesLisp1-142/+142
Silence warnings explicitly initializing all members on construction.
2020-12-31renderer_vulkan: Remove two step initialization on VKDeviceReinUsesLisp1-1/+1
The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
2020-12-31renderer_vulkan: Throw when enumerating devices failsReinUsesLisp1-1/+2
Report device enumeration errors with exceptions to be consistent with other initialization related function calls. Reduces the amount of code to maintain.
2020-12-31renderer_vulkan: Initialize surface in separate fileReinUsesLisp1-0/+5
Move surface initialization code to a separate file. It's unlikely to use this code outside of Vulkan, but keeping platform-specific code (Win32, Xlib, Wayland) in its own translation unit keeps things cleaner.
2020-12-31renderer_vulkan: Create debug callback on separate file and throwReinUsesLisp1-6/+9
Initialize debug callbacks (messenger) from a separate file. This allows sharing code with different backends. Change our Vulkan error handling to use exceptions instead of error codes, simplifying the initialization process.
2020-12-31vulkan_common: Rename renderer_vulkan/wrapper.h to vulkan_common/vulkan_wrapper.hReinUsesLisp1-0/+0
Allows sharing Vulkan wrapper code between different rendering backends.
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp1-4/+113
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.2Lioncash1-11/+14
Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
2020-09-19renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphoreReinUsesLisp1-3/+45
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-08-20renderer_vulkan: Create a Vulkan 1.0 instance when 1.1 is not availableReinUsesLisp1-1/+3
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-13General: Tidy up clang-format warnings part 2Lioncash1-14/+14
2020-06-27renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functionsReinUsesLisp1-0/+54
2020-06-22renderer_vulkan: Update validation layer name and test before enablingReinUsesLisp1-0/+4
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-1/+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/+10
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/+20
2020-04-14renderer_vulkan: Integrate Nvidia Nsight Aftermath on WindowsReinUsesLisp1-2/+1
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-6/+0
2020-04-13renderer_vulkan: Catch device losses in more placesReinUsesLisp1-18/+7
2020-04-01renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapperReinUsesLisp1-0/+3
2020-04-01renderer_vulkan/wrapper: Add command buffer handleReinUsesLisp1-0/+192
2020-04-01renderer_vulkan/wrapper: Add physical device handleReinUsesLisp1-0/+40
2020-04-01renderer_vulkan/wrapper: Add device handleReinUsesLisp1-0/+95
2020-04-01renderer_vulkan/wrapper: Add swapchain handleReinUsesLisp1-0/+7
2020-04-01renderer_vulkan/wrapper: Add fence handleReinUsesLisp1-0/+17
2020-04-01renderer_vulkan/wrapper: Add device memory handleReinUsesLisp1-0/+15
2020-04-01renderer_vulkan/wrapper: Add pool handlesReinUsesLisp1-0/+15
2020-04-01renderer_vulkan/wrapper: Add buffer and image handlesReinUsesLisp1-0/+16
2020-04-01renderer_vulkan/wrapper: Add queue handleReinUsesLisp1-0/+25
2020-04-01renderer_vulkan/wrapper: Add instance handleReinUsesLisp1-0/+17
2020-03-28renderer_vulkan/wrapper: Address feedbackReinUsesLisp1-3/+24
2020-03-27renderer_vulkan/wrapper: Add owning handlesReinUsesLisp1-0/+18
2020-03-27renderer_vulkan/wrapper: Add pool allocations owning templated classReinUsesLisp1-0/+81
2020-03-27renderer_vulkan/wrapper: Add owning handle templated classReinUsesLisp1-0/+144
2020-03-27renderer_vulkan/wrapper: Add destroy and free overload setReinUsesLisp1-0/+28
2020-03-27renderer_vulkan/wrapper: Add dispatch table and loadersReinUsesLisp1-0/+137
2020-03-27renderer_vulkan/wrapper: Add exception classReinUsesLisp1-0/+30
2020-03-27renderer_vulkan/wrapper: Add ToString function for VkResultReinUsesLisp1-0/+3
2020-03-27renderer_vulkan/wrapper: Add Vulakn wrapper and a span helperReinUsesLisp1-0/+83
The intention behind a Vulkan wrapper is to drop Vulkan-Hpp. The issues with Vulkan-Hpp are: - Regular breaks of the API. - Copy constructors that do the same as the aggregates (fixed recently) - External dynamic dispatch that is hard to remove - Alias KHR handles with non-KHR handles making it impossible to use smart handles on Vulkan 1.0 instances with extensions that were included on Vulkan 1.1. - Dynamic dispatchers silently change size depending on preprocessor definitions. Different files will have different dispatch definitions, generating all kinds of hard to debug memory issues. In other words, Vulkan-Hpp is not "production ready" for our needs and this wrapper aims to replace it without losing RAII and exception safety.