vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_versioned_root_signature_deserializer_AddRef().

This commit is contained in:
Henri Verbeet 2024-01-30 12:43:51 +01:00 committed by Alexandre Julliard
parent afd0e45cd6
commit f42411fe4a
Notes: Alexandre Julliard 2024-02-01 23:08:25 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/623

View File

@ -242,7 +242,7 @@ HRESULT vkd3d_create_root_signature_deserializer(const void *data, SIZE_T data_s
struct d3d12_versioned_root_signature_deserializer struct d3d12_versioned_root_signature_deserializer
{ {
ID3D12VersionedRootSignatureDeserializer ID3D12VersionedRootSignatureDeserializer_iface; ID3D12VersionedRootSignatureDeserializer ID3D12VersionedRootSignatureDeserializer_iface;
LONG refcount; unsigned int refcount;
union union
{ {
@ -284,7 +284,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_Que
static ULONG STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_AddRef(ID3D12VersionedRootSignatureDeserializer *iface) static ULONG STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_AddRef(ID3D12VersionedRootSignatureDeserializer *iface)
{ {
struct d3d12_versioned_root_signature_deserializer *deserializer = impl_from_ID3D12VersionedRootSignatureDeserializer(iface); struct d3d12_versioned_root_signature_deserializer *deserializer = impl_from_ID3D12VersionedRootSignatureDeserializer(iface);
ULONG refcount = InterlockedIncrement(&deserializer->refcount); unsigned int refcount = vkd3d_atomic_increment_u32(&deserializer->refcount);
TRACE("%p increasing refcount to %u.\n", deserializer, refcount); TRACE("%p increasing refcount to %u.\n", deserializer, refcount);
@ -294,7 +294,7 @@ static ULONG STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_AddRe
static ULONG STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_Release(ID3D12VersionedRootSignatureDeserializer *iface) static ULONG STDMETHODCALLTYPE d3d12_versioned_root_signature_deserializer_Release(ID3D12VersionedRootSignatureDeserializer *iface)
{ {
struct d3d12_versioned_root_signature_deserializer *deserializer = impl_from_ID3D12VersionedRootSignatureDeserializer(iface); struct d3d12_versioned_root_signature_deserializer *deserializer = impl_from_ID3D12VersionedRootSignatureDeserializer(iface);
ULONG refcount = InterlockedDecrement(&deserializer->refcount); unsigned int refcount = InterlockedDecrement((LONG *)&deserializer->refcount);
TRACE("%p decreasing refcount to %u.\n", deserializer, refcount); TRACE("%p decreasing refcount to %u.\n", deserializer, refcount);