vkd3d-proton/libs/vkd3d
Hans-Kristian Arntzen 6335e411bb vkd3d: Rewrite submission logic for wait fences.
D3D12 has some unfortunate rules around CommandQueue::Wait().
It's legal to release the fence early, before the fence actually
completes its wait operation.

The behavior on D3D12 is just to release all waiters.
For out of order signal/wait, we hold off submissions,
so we can implement this implicitly through CPU signal to UINT64_MAX
on fence release. If we have submitted a wait which depends on the
fence, it will complete in finite time, so it still works fine.

We cannot release the semaphores early in Vulkan, so we must hold on
to a private reference of the ID3D12Fence object until we have observed
that the wait is complete.

To make this work, we refactor waits to use the vkd3d_queue wait list.
On other submits, we resolve the wait. This is a small optimization
since we don't have to perform dummy submits that only performs the wait.
At that time, we signal a timeline semaphore and queue up a d3d12_fence_dec_ref().

Since we're also adding this system where normal submissions signal
timelines, handle the submission counters more correctly by deferring
the decrements until we have waited for the submission itself.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2022-07-18 19:00:25 +02:00
..
shaders vkd3d: Use index type LUT for DGC. 2022-07-11 15:14:13 +02:00
acceleration_structure.c vkd3d: Implement extended DXR queries. 2022-05-30 20:26:50 +02:00
breadcrumbs.c vkd3d: Trace breadcrumbs for execute indirect templates. 2022-07-11 14:59:00 +02:00
bundle.c vkd3d: Implement ID3D12GraphicsCommandList6. 2021-11-19 14:57:51 +01:00
cache.c cache: Unmap files before attempting to delete. 2022-06-28 12:13:03 +02:00
command.c vkd3d: Rewrite submission logic for wait fences. 2022-07-18 19:00:25 +02:00
command_list_profiled.h vkd3d: Implement ID3D12GraphicsCommandList6. 2021-11-19 14:57:51 +01:00
command_list_vkd3d_ext.c vkd3d: Implement new interfaces required for DX12 DLSS support. 2021-08-27 11:37:15 +02:00
debug_ring.c debug: Add concept of implicit instance index to debug ring. 2022-07-11 14:59:00 +02:00
descriptor_debug.c vkd3d: Clean up straggling getenv() calls. 2022-04-25 16:42:41 +02:00
device.c vkd3d: Also add profiles for RE3/RE7. 2022-07-11 15:58:21 +02:00
device_profiled.h vkd3d: Implement ID3D12Device9. 2021-11-19 14:57:51 +01:00
device_vkd3d_ext.c vkd3d: Rewrite memory layout for resource descriptors. 2022-02-25 13:04:43 +01:00
heap.c vkd3d: Don't suballocate scratch buffers. 2022-06-23 14:39:22 +02:00
memory.c vkd3d: Rewrite submission logic for wait fences. 2022-07-18 19:00:25 +02:00
meson.build vkd3d: Add debug ring path for execute indirect template patches. 2022-07-11 14:59:00 +02:00
meta.c vkd3d: Add debug ring path for execute indirect template patches. 2022-07-11 14:59:00 +02:00
raytracing_pipeline.c vkd3d: Do a best effort in handling COLLECTION local static samplers. 2022-07-11 14:58:19 +02:00
renderdoc.c vkd3d: Clean up straggling getenv() calls. 2022-04-25 16:42:41 +02:00
resource.c vkd3d: Force LINEAR images to be allocated as committed resources. 2022-07-11 14:59:24 +02:00
state.c vkd3d-shader: Normalize root signature compatibility hashing. 2022-07-11 14:34:34 +02:00
swapchain.c vkd3d: Don't create user descriptors until we have observed a pipeline. 2022-05-23 16:58:15 +02:00
utils.c utils: Report Wine segfault VkResult directly. 2022-05-23 16:58:15 +02:00
va_map.c vkd3d: Fix some const warnings on MSVC. 2021-03-10 10:48:01 +00:00
vkd3d_descriptor_debug.h vkd3d: Fix some type errors after idl update. 2021-11-22 16:25:13 +01:00
vkd3d_main.c vkd3d-shader: Normalize root signature compatibility hashing. 2022-07-11 14:34:34 +02:00
vkd3d_private.h vkd3d: Rewrite submission logic for wait fences. 2022-07-18 19:00:25 +02:00
vkd3d_renderdoc.h renderdoc: Add global capture support. 2021-10-07 15:33:06 +02:00
vkd3d_shaders.h vkd3d: Add debug ring path for execute indirect template patches. 2022-07-11 14:59:00 +02:00
vulkan_procs.h vkd3d: Enable NV_device_generated_commands extension. 2022-06-24 14:55:39 +02:00