Commit graph

13 commits

Author SHA1 Message Date
ReinUsesLisp
fc515aed5f renderer_vulkan: Move device abstraction to vulkan_common 2021-01-04 02:22:22 -03:00
ReinUsesLisp
aa08e1bfbf renderer_vulkan: Rename VKDevice to Device
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.
2021-01-03 17:51:48 -03:00
ReinUsesLisp
d25b097e84 video_core: Rewrite the texture cache
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-30 03:38:50 -03:00
Lioncash
5db4785535 video_core: Resolve more variable shadowing scenarios pt.3
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
2020-12-05 16:02:23 -05:00
ReinUsesLisp
7c747f9bea renderer_vulkan: Make unconditional use of VK_KHR_timeline_semaphore
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-19 01:46:37 -03:00
Lioncash
e95290cfaf async_shaders: Mark getters as const member functions
While we're at it, we can also mark them as nodiscard.
2020-08-24 01:15:50 -04:00
ameerj
4cb6ad9eaf Remove unneeded newlines, optional Registry in shader params
Addressing feedback from Rodrigo
2020-08-16 16:33:21 -04:00
ameerj
b467d4dbd0 move thread 1/4 count computation into allocate workers method 2020-08-16 12:02:22 -04:00
ameerj
3fa34fa7bf Address feedback, add shader compile notifier, update setting text 2020-08-16 12:02:22 -04:00
ameerj
f029fa19bf Address feedback. Bruteforce delete duplicates 2020-08-16 12:02:22 -04:00
ameerj
77698ae7d6 Vk Async pipeline compilation 2020-08-16 12:02:22 -04:00
David Marcec
73118715ca Use conditional var 2020-07-17 14:26:17 +10:00
David Marcec
a4e811af27 async shaders 2020-07-17 14:24:57 +10:00