Conor McCarthy : vkd3d: Map timeline semaphore values to fence virtual values and buffer out-of-order waits.
Module: vkd3d Branch: master Commit: 8cae04680307141c06c5d7f82b5568a8b3380e96 URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=8cae04680307141c06c5d7f8... Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Fri May 13 01:11:06 2022 +1000 vkd3d: Map timeline semaphore values to fence virtual values and buffer out-of-order waits. Strictly increasing timeline values must be mapped to fence virtual values to avoid invalid use of Vulkan timeline semaphores. In particular, non- increasing values and value jumps of >= 4G are permitted in d3d12. Different virtual D3D12 command queues may map to the same Vulkan queue. If a wait of value N is submitted on one command queue, and then a signal for >= N is submitted on another, but they are sent to the same Vk queue, the wait will never complete. The solution is to buffer out-of-order waits and any subsequent queue commands until an unblocking signal value is submitted to a different D3D12 queue, or signaled on the CPU. Buffering out-of-order waits also fixes the old fence implementation so it is fully functional, though a bit less efficient than timeline semaphores. Based in part on vkd3d-proton patches by Hans-Kristian Arntzen. Unlike the vkd3d-proton implementation, this patch does not use worker threads for submissions to the Vulkan queue. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/command.c | 894 +++++++++++++++++++++++++++------------------ libs/vkd3d/device.c | 81 +--- libs/vkd3d/vkd3d_private.h | 78 +++- tests/d3d12.c | 4 +- 4 files changed, 602 insertions(+), 455 deletions(-) Diff: https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=8cae04680307141c06c5...
participants (1)
-
Alexandre Julliard