From 14f9f03fd66fcd19aeb7541ead5dee5a29bb02b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 22 Apr 2019 10:58:36 +0200 Subject: [PATCH] vkd3d: Rename d3d12_fence_destroy_vk_semaphores_locked(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d/command.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index cdccfe8d..f3271eb7 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -441,7 +441,8 @@ create_fence: return vr; } -static void d3d12_fence_destroy_vk_semaphores_locked(struct d3d12_fence *fence, bool destroy_all) +static void d3d12_fence_garbage_collect_vk_semaphores_locked(struct d3d12_fence *fence, + bool destroy_all) { struct d3d12_device *device = fence->device; const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs; @@ -450,7 +451,7 @@ static void d3d12_fence_destroy_vk_semaphores_locked(struct d3d12_fence *fence, unsigned int i, j; semaphore_count = fence->semaphore_count; - if (!destroy_all && fence->semaphore_count < VKD3D_MAX_VK_SYNC_OBJECTS_PER_D3D12_FENCE) + if (!destroy_all && semaphore_count < VKD3D_MAX_VK_SYNC_OBJECTS_PER_D3D12_FENCE) return; for (i = 0, j = 0; i < fence->semaphore_count; ++i) @@ -491,7 +492,6 @@ static void d3d12_fence_destroy_vk_objects(struct d3d12_fence *fence) const struct vkd3d_vk_device_procs *vk_procs; struct d3d12_device *device = fence->device; unsigned int i; - int rc; if ((rc = pthread_mutex_lock(&fence->mutex))) @@ -509,7 +509,7 @@ static void d3d12_fence_destroy_vk_objects(struct d3d12_fence *fence) fence->old_vk_fences[i] = VK_NULL_HANDLE; } - d3d12_fence_destroy_vk_semaphores_locked(fence, true); + d3d12_fence_garbage_collect_vk_semaphores_locked(fence, true); pthread_mutex_unlock(&fence->mutex); } @@ -528,8 +528,7 @@ static HRESULT d3d12_fence_add_vk_semaphore(struct d3d12_fence *fence, return E_FAIL; } - /* Destroy old Vulkan semaphores. */ - d3d12_fence_destroy_vk_semaphores_locked(fence, false); + d3d12_fence_garbage_collect_vk_semaphores_locked(fence, false); if (vkd3d_array_reserve((void **)&fence->semaphores, &fence->semaphores_size, fence->semaphore_count + 1, sizeof(*fence->semaphores)))