mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d: Do not read max_pending_value without holding the fence's mutex.
This commit is contained in:
parent
e076fd9c77
commit
df36026633
Notes:
Alexandre Julliard
2023-02-13 22:20:19 +01:00
Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/87
@ -6801,13 +6801,14 @@ static bool d3d12_command_queue_flush_ops(struct d3d12_command_queue *queue, boo
|
||||
{
|
||||
case VKD3D_CS_OP_WAIT:
|
||||
fence = op->u.wait.fence;
|
||||
vkd3d_mutex_lock(&fence->mutex);
|
||||
if (op->u.wait.value > fence->max_pending_value)
|
||||
{
|
||||
vkd3d_mutex_unlock(&fence->mutex);
|
||||
queue->ops_count -= i;
|
||||
memmove(queue->ops, op, queue->ops_count * sizeof(*op));
|
||||
goto done;
|
||||
}
|
||||
vkd3d_mutex_lock(&fence->mutex);
|
||||
d3d12_command_queue_wait_locked(queue, fence, op->u.wait.value);
|
||||
d3d12_fence_decref(fence);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user