Commit graph

32 commits

Author SHA1 Message Date
ameerj
77698ae7d6 Vk Async pipeline compilation 2020-08-16 12:02:22 -04:00
Lioncash
78ddcbe3ba General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
bunnei
2c57273505 Merge pull request #4150 from ReinUsesLisp/dynamic-state-impl
vulkan: Use VK_EXT_extended_dynamic_state when available
2020-07-07 10:58:09 -04:00
ReinUsesLisp
0a32575e27 renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functions 2020-06-26 20:55:15 -03:00
ReinUsesLisp
ec8465e843 renderer_vulkan: Update validation layer name and test before enabling
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-22 04:10:45 -03:00
Lioncash
9ba25c342f vulkan/wrapper: Remove noexcept from GetSurfaceCapabilitiesKHR()
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-06-19 23:01:59 -04:00
ReinUsesLisp
8835d40024 {maxwell_3d,buffer_cache}: Implement memory barriers using 3D registers
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-28 02:18:12 -03:00
bunnei
c916ad62e7 Merge pull request #3677 from FernandoS27/better-sync
Introduce Predictive Flushing and Improve ASYNC GPU
2020-04-22 22:09:38 -04:00
ReinUsesLisp
0b9454849d vk_fence_manager: Initial implementation 2020-04-22 11:36:19 -04:00
ReinUsesLisp
c4dc51f168 renderer_vulkan: Integrate Nvidia Nsight Aftermath on Windows
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-14 00:39:21 -03:00
ReinUsesLisp
d351b10ad3 renderer_vulkan: Remove Nvidia checkpoints 2020-04-13 17:33:59 -03:00
ReinUsesLisp
8809b9fe3c renderer_vulkan: Catch device losses in more places 2020-04-13 17:33:59 -03:00
ReinUsesLisp
83b47aa0d9 renderer_vulkan/wrapper: Add vkEnumerateInstanceExtensionProperties wrapper 2020-03-31 21:32:08 -03:00
ReinUsesLisp
c3332558df renderer_vulkan/wrapper: Add command buffer handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp
010a965e64 renderer_vulkan/wrapper: Add physical device handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp
319737fd89 renderer_vulkan/wrapper: Add device handle 2020-03-31 21:32:08 -03:00
ReinUsesLisp
a04066352b renderer_vulkan/wrapper: Add swapchain handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp
cea9fdab2e renderer_vulkan/wrapper: Add fence handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp
00c88c7d6d renderer_vulkan/wrapper: Add device memory handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp
e84b3a9f71 renderer_vulkan/wrapper: Add pool handles 2020-03-31 21:32:07 -03:00
ReinUsesLisp
2ed17b8c92 renderer_vulkan/wrapper: Add buffer and image handles 2020-03-31 21:32:07 -03:00
ReinUsesLisp
01bf15ce40 renderer_vulkan/wrapper: Add queue handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp
467a8c3285 renderer_vulkan/wrapper: Add instance handle 2020-03-31 21:32:07 -03:00
ReinUsesLisp
3a42c2f3d5 renderer_vulkan/wrapper: Address feedback 2020-03-28 04:09:02 -03:00
ReinUsesLisp
f606c9cf1e renderer_vulkan/wrapper: Add owning handles 2020-03-27 03:21:04 -03:00
ReinUsesLisp
7eaae70c4b renderer_vulkan/wrapper: Add pool allocations owning templated class 2020-03-27 03:21:04 -03:00
ReinUsesLisp
4ef176e737 renderer_vulkan/wrapper: Add owning handle templated class 2020-03-27 03:21:04 -03:00
ReinUsesLisp
f4281513d9 renderer_vulkan/wrapper: Add destroy and free overload set 2020-03-27 03:21:04 -03:00
ReinUsesLisp
17a033ce78 renderer_vulkan/wrapper: Add dispatch table and loaders 2020-03-27 03:21:04 -03:00
ReinUsesLisp
d1edc121e1 renderer_vulkan/wrapper: Add exception class 2020-03-27 03:21:04 -03:00
ReinUsesLisp
a12fd8f995 renderer_vulkan/wrapper: Add ToString function for VkResult 2020-03-27 03:21:03 -03:00
ReinUsesLisp
2cad825ec7 renderer_vulkan/wrapper: Add Vulakn wrapper and a span helper
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.
2020-03-27 03:13:18 -03:00