From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index d146e322d..776210097 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -926,7 +926,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_fence_QueryInterface(ID3D12Fence1 *iface, static ULONG STDMETHODCALLTYPE d3d12_fence_AddRef(ID3D12Fence1 *iface) { struct d3d12_fence *fence = impl_from_ID3D12Fence1(iface); - ULONG refcount = InterlockedIncrement(&fence->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&fence->refcount);
TRACE("%p increasing refcount to %u.\n", fence, refcount);
@@ -941,7 +941,7 @@ static void d3d12_fence_incref(struct d3d12_fence *fence) static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface) { struct d3d12_fence *fence = impl_from_ID3D12Fence1(iface); - ULONG refcount = InterlockedDecrement(&fence->refcount); + ULONG refcount = InterlockedDecrement((LONG *)&fence->refcount);
TRACE("%p decreasing refcount to %u.\n", fence, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 2841122ad..763606fdd 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -622,7 +622,7 @@ struct d3d12_fence { ID3D12Fence1 ID3D12Fence1_iface; LONG internal_refcount; - LONG refcount; + unsigned int refcount;
D3D12_FENCE_FLAGS flags;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 776210097..5df15b644 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -941,7 +941,7 @@ static void d3d12_fence_incref(struct d3d12_fence *fence) static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface) { struct d3d12_fence *fence = impl_from_ID3D12Fence1(iface); - ULONG refcount = InterlockedDecrement((LONG *)&fence->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&fence->refcount);
TRACE("%p decreasing refcount to %u.\n", fence, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 5df15b644..f7880ab29 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -935,7 +935,7 @@ static ULONG STDMETHODCALLTYPE d3d12_fence_AddRef(ID3D12Fence1 *iface)
static void d3d12_fence_incref(struct d3d12_fence *fence) { - InterlockedIncrement(&fence->internal_refcount); + vkd3d_atomic_increment_u32(&fence->internal_refcount); }
static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface) @@ -953,7 +953,7 @@ static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface)
static void d3d12_fence_decref(struct d3d12_fence *fence) { - ULONG internal_refcount = InterlockedDecrement(&fence->internal_refcount); + ULONG internal_refcount = InterlockedDecrement((LONG *)&fence->internal_refcount);
if (!internal_refcount) { diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 763606fdd..56b430524 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -621,7 +621,7 @@ struct vkd3d_signaled_semaphore struct d3d12_fence { ID3D12Fence1 ID3D12Fence1_iface; - LONG internal_refcount; + unsigned int internal_refcount; unsigned int refcount;
D3D12_FENCE_FLAGS flags;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index f7880ab29..d4af9d011 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -953,24 +953,24 @@ static ULONG STDMETHODCALLTYPE d3d12_fence_Release(ID3D12Fence1 *iface)
static void d3d12_fence_decref(struct d3d12_fence *fence) { - ULONG internal_refcount = InterlockedDecrement((LONG *)&fence->internal_refcount); + struct d3d12_device *device;
- if (!internal_refcount) - { - struct d3d12_device *device = fence->device; + if (vkd3d_atomic_decrement_u32(&fence->internal_refcount)) + return;
- vkd3d_private_store_destroy(&fence->private_store); + device = fence->device;
- d3d12_fence_destroy_vk_objects(fence); + vkd3d_private_store_destroy(&fence->private_store);
- vkd3d_free(fence->events); - vkd3d_free(fence->semaphores); - vkd3d_mutex_destroy(&fence->mutex); - vkd3d_cond_destroy(&fence->null_event_cond); - vkd3d_free(fence); + d3d12_fence_destroy_vk_objects(fence);
- d3d12_device_release(device); - } + vkd3d_free(fence->events); + vkd3d_free(fence->semaphores); + vkd3d_mutex_destroy(&fence->mutex); + vkd3d_cond_destroy(&fence->null_event_cond); + vkd3d_free(fence); + + d3d12_device_release(device); }
static HRESULT STDMETHODCALLTYPE d3d12_fence_GetPrivateData(ID3D12Fence1 *iface,
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index d4af9d011..f6d405f8a 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -1635,7 +1635,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_allocator_QueryInterface(ID3D12Co static ULONG STDMETHODCALLTYPE d3d12_command_allocator_AddRef(ID3D12CommandAllocator *iface) { struct d3d12_command_allocator *allocator = impl_from_ID3D12CommandAllocator(iface); - ULONG refcount = InterlockedIncrement(&allocator->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&allocator->refcount);
TRACE("%p increasing refcount to %u.\n", allocator, refcount);
@@ -1645,7 +1645,7 @@ static ULONG STDMETHODCALLTYPE d3d12_command_allocator_AddRef(ID3D12CommandAlloc static ULONG STDMETHODCALLTYPE d3d12_command_allocator_Release(ID3D12CommandAllocator *iface) { struct d3d12_command_allocator *allocator = impl_from_ID3D12CommandAllocator(iface); - ULONG refcount = InterlockedDecrement(&allocator->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&allocator->refcount);
TRACE("%p decreasing refcount to %u.\n", allocator, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 56b430524..709b969ff 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1365,7 +1365,7 @@ struct vkd3d_buffer struct d3d12_command_allocator { ID3D12CommandAllocator ID3D12CommandAllocator_iface; - LONG refcount; + unsigned int refcount;
D3D12_COMMAND_LIST_TYPE type; VkQueueFlags vk_queue_flags;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index f6d405f8a..a0e88382c 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -1645,7 +1645,7 @@ static ULONG STDMETHODCALLTYPE d3d12_command_allocator_AddRef(ID3D12CommandAlloc static ULONG STDMETHODCALLTYPE d3d12_command_allocator_Release(ID3D12CommandAllocator *iface) { struct d3d12_command_allocator *allocator = impl_from_ID3D12CommandAllocator(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&allocator->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&allocator->refcount);
TRACE("%p decreasing refcount to %u.\n", allocator, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index a0e88382c..9648a9f45 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2320,7 +2320,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_QueryInterface(ID3D12Graphic static ULONG STDMETHODCALLTYPE d3d12_command_list_AddRef(ID3D12GraphicsCommandList5 *iface) { struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface); - ULONG refcount = InterlockedIncrement(&list->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&list->refcount);
TRACE("%p increasing refcount to %u.\n", list, refcount);
@@ -2335,7 +2335,7 @@ static void vkd3d_pipeline_bindings_cleanup(struct vkd3d_pipeline_bindings *bind static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList5 *iface) { struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface); - ULONG refcount = InterlockedDecrement(&list->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&list->refcount);
TRACE("%p decreasing refcount to %u.\n", list, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 709b969ff..de7a129a3 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1466,7 +1466,7 @@ enum vkd3d_pipeline_bind_point struct d3d12_command_list { ID3D12GraphicsCommandList5 ID3D12GraphicsCommandList5_iface; - LONG refcount; + unsigned int refcount;
D3D12_COMMAND_LIST_TYPE type; VkQueueFlags vk_queue_flags;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 9648a9f45..2307659d7 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -2335,7 +2335,7 @@ static void vkd3d_pipeline_bindings_cleanup(struct vkd3d_pipeline_bindings *bind static ULONG STDMETHODCALLTYPE d3d12_command_list_Release(ID3D12GraphicsCommandList5 *iface) { struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList5(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&list->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&list->refcount);
TRACE("%p decreasing refcount to %u.\n", list, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 2307659d7..69516663c 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -6230,7 +6230,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_queue_QueryInterface(ID3D12Comman static ULONG STDMETHODCALLTYPE d3d12_command_queue_AddRef(ID3D12CommandQueue *iface) { struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface); - ULONG refcount = InterlockedIncrement(&command_queue->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&command_queue->refcount);
TRACE("%p increasing refcount to %u.\n", command_queue, refcount);
@@ -6272,7 +6272,7 @@ static void d3d12_command_queue_op_array_destroy(struct d3d12_command_queue_op_a static ULONG STDMETHODCALLTYPE d3d12_command_queue_Release(ID3D12CommandQueue *iface) { struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface); - ULONG refcount = InterlockedDecrement(&command_queue->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&command_queue->refcount);
TRACE("%p decreasing refcount to %u.\n", command_queue, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index de7a129a3..a6e8c0a74 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1622,7 +1622,7 @@ struct d3d12_command_queue_op_array struct d3d12_command_queue { ID3D12CommandQueue ID3D12CommandQueue_iface; - LONG refcount; + unsigned int refcount;
D3D12_COMMAND_QUEUE_DESC desc;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 69516663c..840bc1a83 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -6272,7 +6272,7 @@ static void d3d12_command_queue_op_array_destroy(struct d3d12_command_queue_op_a static ULONG STDMETHODCALLTYPE d3d12_command_queue_Release(ID3D12CommandQueue *iface) { struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&command_queue->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&command_queue->refcount);
TRACE("%p decreasing refcount to %u.\n", command_queue, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 840bc1a83..b5a46a1d3 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -7442,7 +7442,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_signature_QueryInterface(ID3D12Co static ULONG STDMETHODCALLTYPE d3d12_command_signature_AddRef(ID3D12CommandSignature *iface) { struct d3d12_command_signature *signature = impl_from_ID3D12CommandSignature(iface); - ULONG refcount = InterlockedIncrement(&signature->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&signature->refcount);
TRACE("%p increasing refcount to %u.\n", signature, refcount);
@@ -7452,7 +7452,7 @@ static ULONG STDMETHODCALLTYPE d3d12_command_signature_AddRef(ID3D12CommandSigna static ULONG STDMETHODCALLTYPE d3d12_command_signature_Release(ID3D12CommandSignature *iface) { struct d3d12_command_signature *signature = impl_from_ID3D12CommandSignature(iface); - ULONG refcount = InterlockedDecrement(&signature->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&signature->refcount);
TRACE("%p decreasing refcount to %u.\n", signature, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index a6e8c0a74..64a01c41a 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1657,7 +1657,7 @@ HRESULT d3d12_command_queue_create(struct d3d12_device *device, struct d3d12_command_signature { ID3D12CommandSignature ID3D12CommandSignature_iface; - LONG refcount; + unsigned int refcount; unsigned int internal_refcount;
D3D12_COMMAND_SIGNATURE_DESC desc;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index b5a46a1d3..3cf58e06d 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -7452,7 +7452,7 @@ static ULONG STDMETHODCALLTYPE d3d12_command_signature_AddRef(ID3D12CommandSigna static ULONG STDMETHODCALLTYPE d3d12_command_signature_Release(ID3D12CommandSignature *iface) { struct d3d12_command_signature *signature = impl_from_ID3D12CommandSignature(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&signature->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&signature->refcount);
TRACE("%p decreasing refcount to %u.\n", signature, refcount);