10 Feb
2023
10 Feb
'23
5:42 a.m.
My understanding of the problem with blocked_queue_count is this sequence: 1. thread0: Is in d3d12_command_queue_Wait() after `if (!command_queue->ops_count && value <= fence->max_pending_value)` but has not yet called d3d12_device_add_blocked_command_queues(). 2. thread1: Is handling a signal which unblocks the wait, but had not yet updated max_pending_value when thread0 checked it. It executes `if (!device->blocked_queue_count)` before thread0 calls d3d12_device_add_blocked_command_queues(). 3. thread0: calls d3d12_device_add_blocked_command_queues() but the corresponding call to d3d12_device_flush_blocked_queues() has passed in thread1. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/87#note_23681