From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index a360b0ef4..7739e6780 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -308,7 +308,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_heap_QueryInterface(ID3D12Heap *iface, static ULONG STDMETHODCALLTYPE d3d12_heap_AddRef(ID3D12Heap *iface) { struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); - ULONG refcount = InterlockedIncrement(&heap->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&heap->refcount);
TRACE("%p increasing refcount to %u.\n", heap, refcount);
@@ -345,7 +345,7 @@ static void d3d12_heap_destroy(struct d3d12_heap *heap) static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface) { struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); - ULONG refcount = InterlockedDecrement(&heap->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount);
TRACE("%p decreasing refcount to %u.\n", heap, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index ec83d350e..5b5ef9b08 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -665,7 +665,7 @@ VkResult vkd3d_create_timeline_semaphore(const struct d3d12_device *device, uint struct d3d12_heap { ID3D12Heap ID3D12Heap_iface; - LONG refcount; + unsigned int refcount; LONG resource_count;
bool is_private;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 7739e6780..05463cb34 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -345,7 +345,7 @@ static void d3d12_heap_destroy(struct d3d12_heap *heap) static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface) { struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&heap->refcount);
TRACE("%p decreasing refcount to %u.\n", heap, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 05463cb34..e5f743f53 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -358,7 +358,7 @@ static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface)
static void d3d12_heap_resource_destroyed(struct d3d12_heap *heap) { - if (!InterlockedDecrement(&heap->resource_count) && (!heap->refcount || heap->is_private)) + if (!InterlockedDecrement((LONG *)&heap->resource_count) && (!heap->refcount || heap->is_private)) d3d12_heap_destroy(heap); }
@@ -2174,7 +2174,7 @@ static HRESULT vkd3d_bind_heap_memory(struct d3d12_device *device, { resource->heap = heap; resource->heap_offset = heap_offset; - InterlockedIncrement(&heap->resource_count); + vkd3d_atomic_increment_u32(&heap->resource_count); } else { diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 5b5ef9b08..4b4daa53d 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -666,7 +666,7 @@ struct d3d12_heap { ID3D12Heap ID3D12Heap_iface; unsigned int refcount; - LONG resource_count; + unsigned int resource_count;
bool is_private; D3D12_HEAP_DESC desc;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 53978e654..f607b1787 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1003,7 +1003,7 @@ static void d3d12_resource_destroy(struct d3d12_resource *resource, struct d3d12
static ULONG d3d12_resource_incref(struct d3d12_resource *resource) { - ULONG refcount = InterlockedIncrement(&resource->internal_refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&resource->internal_refcount);
TRACE("%p increasing refcount to %u.\n", resource, refcount);
@@ -1012,7 +1012,7 @@ static ULONG d3d12_resource_incref(struct d3d12_resource *resource)
static ULONG d3d12_resource_decref(struct d3d12_resource *resource) { - ULONG refcount = InterlockedDecrement(&resource->internal_refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&resource->internal_refcount);
TRACE("%p decreasing refcount to %u.\n", resource, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 4b4daa53d..68941537c 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -722,7 +722,7 @@ struct d3d12_resource { ID3D12Resource1 ID3D12Resource1_iface; LONG refcount; - LONG internal_refcount; + unsigned int internal_refcount;
D3D12_RESOURCE_DESC desc; const struct vkd3d_format *format;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index e5f743f53..53978e654 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -358,7 +358,7 @@ static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface)
static void d3d12_heap_resource_destroyed(struct d3d12_heap *heap) { - if (!InterlockedDecrement((LONG *)&heap->resource_count) && (!heap->refcount || heap->is_private)) + if (!vkd3d_atomic_decrement_u32(&heap->resource_count) && (!heap->refcount || heap->is_private)) d3d12_heap_destroy(heap); }
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index f607b1787..c44f3ef65 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1012,7 +1012,7 @@ static ULONG d3d12_resource_incref(struct d3d12_resource *resource)
static ULONG d3d12_resource_decref(struct d3d12_resource *resource) { - unsigned int refcount = InterlockedDecrement((LONG *)&resource->internal_refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&resource->internal_refcount);
TRACE("%p decreasing refcount to %u.\n", resource, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index c44f3ef65..9da9d19a0 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1284,7 +1284,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_resource_QueryInterface(ID3D12Resource1 * static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface) { struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface); - ULONG refcount = InterlockedIncrement(&resource->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&resource->refcount);
TRACE("%p increasing refcount to %u.\n", resource, refcount);
@@ -1302,7 +1302,7 @@ static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface) static ULONG STDMETHODCALLTYPE d3d12_resource_Release(ID3D12Resource1 *iface) { struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface); - ULONG refcount = InterlockedDecrement(&resource->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&resource->refcount);
TRACE("%p decreasing refcount to %u.\n", resource, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 68941537c..47709ffc8 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -721,7 +721,7 @@ struct d3d12_resource_tile_info struct d3d12_resource { ID3D12Resource1 ID3D12Resource1_iface; - LONG refcount; + unsigned int refcount; unsigned int internal_refcount;
D3D12_RESOURCE_DESC desc;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 9da9d19a0..e95c90dca 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1302,7 +1302,7 @@ static ULONG STDMETHODCALLTYPE d3d12_resource_AddRef(ID3D12Resource1 *iface) static ULONG STDMETHODCALLTYPE d3d12_resource_Release(ID3D12Resource1 *iface) { struct d3d12_resource *resource = impl_from_ID3D12Resource1(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&resource->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&resource->refcount);
TRACE("%p decreasing refcount to %u.\n", resource, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index e95c90dca..ccc2affcb 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -4010,7 +4010,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_QueryInterface(ID3D12Desc static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_AddRef(ID3D12DescriptorHeap *iface) { struct d3d12_descriptor_heap *heap = impl_from_ID3D12DescriptorHeap(iface); - ULONG refcount = InterlockedIncrement(&heap->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&heap->refcount);
TRACE("%p increasing refcount to %u.\n", heap, refcount);
@@ -4020,7 +4020,7 @@ static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_AddRef(ID3D12DescriptorHeap static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHeap *iface) { struct d3d12_descriptor_heap *heap = impl_from_ID3D12DescriptorHeap(iface); - ULONG refcount = InterlockedDecrement(&heap->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount);
TRACE("%p decreasing refcount to %u.\n", heap, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 47709ffc8..731afe0ad 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1046,7 +1046,7 @@ struct d3d12_descriptor_heap_vk_set struct d3d12_descriptor_heap { ID3D12DescriptorHeap ID3D12DescriptorHeap_iface; - LONG refcount; + unsigned int refcount; uint64_t serial_id;
D3D12_DESCRIPTOR_HEAP_DESC desc;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index ccc2affcb..dbf840168 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -4020,7 +4020,7 @@ static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_AddRef(ID3D12DescriptorHeap static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHeap *iface) { struct d3d12_descriptor_heap *heap = impl_from_ID3D12DescriptorHeap(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&heap->refcount);
TRACE("%p decreasing refcount to %u.\n", heap, refcount);
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index dbf840168..a6c120025 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -4429,7 +4429,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_query_heap_QueryInterface(ID3D12QueryHeap static ULONG STDMETHODCALLTYPE d3d12_query_heap_AddRef(ID3D12QueryHeap *iface) { struct d3d12_query_heap *heap = impl_from_ID3D12QueryHeap(iface); - ULONG refcount = InterlockedIncrement(&heap->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&heap->refcount);
TRACE("%p increasing refcount to %u.\n", heap, refcount);
@@ -4439,7 +4439,7 @@ static ULONG STDMETHODCALLTYPE d3d12_query_heap_AddRef(ID3D12QueryHeap *iface) static ULONG STDMETHODCALLTYPE d3d12_query_heap_Release(ID3D12QueryHeap *iface) { struct d3d12_query_heap *heap = impl_from_ID3D12QueryHeap(iface); - ULONG refcount = InterlockedDecrement(&heap->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount);
TRACE("%p decreasing refcount to %u.\n", heap, refcount);
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 731afe0ad..bfe4d514e 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1085,7 +1085,7 @@ HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device, struct d3d12_query_heap { ID3D12QueryHeap ID3D12QueryHeap_iface; - LONG refcount; + unsigned int refcount;
VkQueryPool vk_query_pool;
From: Henri Verbeet hverbeet@codeweavers.com
--- libs/vkd3d/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index a6c120025..cd2f9af0e 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -4439,7 +4439,7 @@ static ULONG STDMETHODCALLTYPE d3d12_query_heap_AddRef(ID3D12QueryHeap *iface) static ULONG STDMETHODCALLTYPE d3d12_query_heap_Release(ID3D12QueryHeap *iface) { struct d3d12_query_heap *heap = impl_from_ID3D12QueryHeap(iface); - unsigned int refcount = InterlockedDecrement((LONG *)&heap->refcount); + unsigned int refcount = vkd3d_atomic_decrement_u32(&heap->refcount);
TRACE("%p decreasing refcount to %u.\n", heap, refcount);
This merge request was approved by Giovanni Mascellani.