Skip to content

Commit

Permalink
vkd3d: Flush wait semaphores eagerly on NV proprietary.
Browse files Browse the repository at this point in the history
Signed-off-by: Hans-Kristian Arntzen <[email protected]>
  • Loading branch information
HansKristian-Work committed Jan 6, 2025
1 parent 0292d0f commit d65575e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/vkd3d/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -19539,6 +19539,14 @@ static void *d3d12_command_queue_submission_worker_main(void *userdata)
{
cookie = vkd3d_queue_timeline_trace_register_generic_region(&queue->device->queue_timeline_trace, "WAIT (normal)");
d3d12_command_queue_wait(queue, impl_from_ID3D12Fence1(submission.wait.fence), submission.wait.value);

/* NVIDIA drivers seem to prefer that waits are flushed on their own?
* Currently not understood why, but this resolves a regression in HZD remastered. */
if (!(vkd3d_config_flags & VKD3D_CONFIG_FLAG_SKIP_DRIVER_WORKAROUNDS) &&
queue->device->device_info.vulkan_1_2_properties.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY)
{
d3d12_command_queue_flush_waiters(queue, 0u);
}
}

d3d12_fence_iface_dec_ref(submission.wait.fence);
Expand Down

0 comments on commit d65575e

Please sign in to comment.