vkd3d: Release queued fences when stopping the fence worker.

This commit is contained in:
Giovanni Mascellani 2025-01-20 22:45:15 +01:00 committed by Henri Verbeet
parent ed7a846e2e
commit bdb8291f6c
Notes: Henri Verbeet 2025-01-21 14:13:31 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Giovanni Mascellani (@giomasce)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1343

View File

@ -399,6 +399,7 @@ static HRESULT vkd3d_fence_worker_start(struct vkd3d_fence_worker *worker,
static HRESULT vkd3d_fence_worker_stop(struct vkd3d_fence_worker *worker,
struct d3d12_device *device)
{
unsigned int i;
HRESULT hr;
TRACE("worker %p.\n", worker);
@ -416,6 +417,9 @@ static HRESULT vkd3d_fence_worker_stop(struct vkd3d_fence_worker *worker,
vkd3d_mutex_destroy(&worker->mutex);
vkd3d_cond_destroy(&worker->cond);
for (i = 0; i < worker->fence_count; ++i)
d3d12_fence_decref(worker->fences[i].fence);
vkd3d_free(worker->fences);
return S_OK;