vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_root_signature_deserializer_AddRef().

This commit is contained in:
Henri Verbeet 2024-01-30 12:38:41 +01:00 committed by Alexandre Julliard
parent 9434687c5b
commit c2e82cf06a
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

@ -82,7 +82,7 @@ HRESULT vkd3d_create_device(const struct vkd3d_device_create_info *create_info,
struct d3d12_root_signature_deserializer struct d3d12_root_signature_deserializer
{ {
ID3D12RootSignatureDeserializer ID3D12RootSignatureDeserializer_iface; ID3D12RootSignatureDeserializer ID3D12RootSignatureDeserializer_iface;
LONG refcount; unsigned int refcount;
union union
{ {
@ -123,7 +123,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_root_signature_deserializer_QueryInterfac
static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_AddRef(ID3D12RootSignatureDeserializer *iface) static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_AddRef(ID3D12RootSignatureDeserializer *iface)
{ {
struct d3d12_root_signature_deserializer *deserializer = impl_from_ID3D12RootSignatureDeserializer(iface); struct d3d12_root_signature_deserializer *deserializer = impl_from_ID3D12RootSignatureDeserializer(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);
@ -133,7 +133,7 @@ static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_AddRef(ID3D12Ro
static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_Release(ID3D12RootSignatureDeserializer *iface) static ULONG STDMETHODCALLTYPE d3d12_root_signature_deserializer_Release(ID3D12RootSignatureDeserializer *iface)
{ {
struct d3d12_root_signature_deserializer *deserializer = impl_from_ID3D12RootSignatureDeserializer(iface); struct d3d12_root_signature_deserializer *deserializer = impl_from_ID3D12RootSignatureDeserializer(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);