aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/vulkan_common
AgeCommit message (Collapse)Author
2021-02-13vulkan_device: Require VK_EXT_robustness2ReinUsesLisp
We are already using robustness2 features without requiring it explicitly, causing potential crashes on drivers without the extension. Requiring this at boot allows better diagnostics for it and formalizes our usage on the extension.
2021-02-13vk_staging_buffer_pool: Add stream buffer for small uploadsReinUsesLisp
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_device: Enable robustBufferAccessReinUsesLisp
Fix regression on Pascal on Animal Crossing: New Horizons, fixing a validation error.
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp
Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
2021-02-13vulkan_common: Expose interop and headless devicesReinUsesLisp
2021-02-13vulkan_common: Make interop extensions mandatoryReinUsesLisp
2021-02-13vulkan_device: Enable robust buffersReinUsesLisp
2021-02-13vulkan_device: Use designated initializers for featuresReinUsesLisp
2021-02-13vulkan_wrapper: Add memory barrier pipeline barrier helperReinUsesLisp
2021-02-13vulkan_device: Fix formatting of constantsReinUsesLisp
2021-02-13vulkan_wrapper: Add interop functionsReinUsesLisp
2021-02-13vulkan_instance: Initialize Vulkan instance in a separate threadReinUsesLisp
Workaround an issue on Nvidia where creating a Vulkan instance from an active OpenGL thread disables threaded optimization on the driver. This optimization is important to have good performance on Nvidia OpenGL.
2021-02-13vulkan_wrapper: Pull Windows symbolsReinUsesLisp
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-27vulkan_device: Blacklist Intel from float16 math (#5798)Rodrigo Locatti
Astral Chain crashes Intel's SPIR-V compiler when using fp16. Disable this while the vendor works on a fix.
2021-01-24Merge pull request #5807 from ReinUsesLisp/vc-warningsLC
video_core: Silence the remaining gcc warnings and enforce them
2021-01-24vulkan_device: Lift VK_EXT_extended_dynamic_state blacklist on RDNAReinUsesLisp
It seems to be safe to use this on new drivers.
2021-01-24video_core: Silence -Wmissing-field-initializers warningsReinUsesLisp
2021-01-23nsight_aftermath_tracker: Fix build issues when enabledReinUsesLisp
Fixes a bunch of build errors when Nsight Aftermath is properly enabled.
2021-01-17Merge pull request #5745 from lioncash/documentationRodrigo Locatti
video_core: Resolve -Wdocumentation warnings
2021-01-17video_core: Resolve -Wdocumentation warningsLioncash
Silences some -Wdocumentation warnings on Clang.
2021-01-17vulkan_debug_callback: Add missing header guardLioncash
Prevents inclusion issues from occurring.
2021-01-15vulkan_memory_allocator: Remove unnecesary 'device' memory from commitsReinUsesLisp
2021-01-15vulkan_memory_allocator: Add allocation support for download typesReinUsesLisp
Implements the allocator logic to handle download memory types. This will try to use HOST_CACHED_BIT when available.
2021-01-15vulkan_memory_allocator: Add "download" memory usage hintReinUsesLisp
Allow users of the allocator to hint memory usage for downloads. This removes the non-descriptive boolean passed for "host visible" or not host visible memory commits, and uses an enum to hint device local, upload and download usages.
2021-01-15vulkan_common: Move allocator to the common directoryReinUsesLisp
Allow using the abstraction from the OpenGL backend.
2021-01-15Merge pull request #5350 from ReinUsesLisp/vk-init-warnsRodrigo Locatti
vulkan_common: Silence missing initializer warnings
2021-01-15vulkan_common: Silence missing initializer warningsReinUsesLisp
Silence warnings explicitly initializing all members on construction.
2021-01-15vulkan_device: Enable shaderStorageImageMultisample conditionallyReinUsesLisp
Fix Vulkan initialization on ANV.
2021-01-13vulkan_device: Remove requirement on shaderStorageImageMultisampleReinUsesLisp
yuzu doesn't currently emulate MS image stores. Requiring this makes no sense for now. Fixes ANV not booting any games on Vulkan.
2021-01-07vulkan_library: Common::DynamicLibrary::Open is [[nodiscard]]MerryMage
Ignore the return value on __APPLE__ systems as well
2021-01-04vulkan_device: Allow creating a device without surfaceReinUsesLisp
2021-01-04renderer_vulkan/nsight_aftermath_tracker: Move to vulkan_commonReinUsesLisp
2021-01-04renderer_vulkan: Move device abstraction to vulkan_commonReinUsesLisp
2020-12-31vulkan_instance: Allow different Vulkan versions and enforce 1.1ReinUsesLisp
For listing the available physical devices we can use Vulkan 1.0. Now that MoltenVK supports 1.1 we can require it for running games. Add missing documentation.
2020-12-31renderer_vulkan: Remove two step initialization on VKDeviceReinUsesLisp
The Vulkan device abstraction either initializes successfully on the constructor or throws a Vulkan exception.
2020-12-31renderer_vulkan: Throw when enumerating devices failsReinUsesLisp
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 fileReinUsesLisp
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 throwReinUsesLisp
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-31renderer_vulkan: Move instance initialization to a separate fileReinUsesLisp
Simplify Vulkan's backend initialization code by moving it to a separate file, allowing us to initialize a Vulkan instance from different backends.
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-12-31vulkan_common: Move dynamic library load to a separate fileReinUsesLisp
Allows us to initialize a Vulkan dynamic library from different backends without duplicating code.