mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-common: Use vkd3d_atomic_increment_u32() in vkd3d_blob_AddRef().
This commit is contained in:
parent
5fe3c624d5
commit
bb6b393c15
Notes:
Alexandre Julliard
2024-01-18 23:21:43 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/576
@ -27,7 +27,7 @@
|
||||
struct vkd3d_blob
|
||||
{
|
||||
ID3D10Blob ID3DBlob_iface;
|
||||
LONG refcount;
|
||||
unsigned int refcount;
|
||||
|
||||
void *buffer;
|
||||
SIZE_T size;
|
||||
@ -59,7 +59,7 @@ static HRESULT STDMETHODCALLTYPE vkd3d_blob_QueryInterface(ID3DBlob *iface, REFI
|
||||
static ULONG STDMETHODCALLTYPE vkd3d_blob_AddRef(ID3DBlob *iface)
|
||||
{
|
||||
struct vkd3d_blob *blob = impl_from_ID3DBlob(iface);
|
||||
ULONG refcount = InterlockedIncrement(&blob->refcount);
|
||||
unsigned int refcount = vkd3d_atomic_increment_u32(&blob->refcount);
|
||||
|
||||
TRACE("%p increasing refcount to %u.\n", blob, refcount);
|
||||
|
||||
@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE vkd3d_blob_AddRef(ID3DBlob *iface)
|
||||
static ULONG STDMETHODCALLTYPE vkd3d_blob_Release(ID3DBlob *iface)
|
||||
{
|
||||
struct vkd3d_blob *blob = impl_from_ID3DBlob(iface);
|
||||
ULONG refcount = InterlockedDecrement(&blob->refcount);
|
||||
ULONG refcount = InterlockedDecrement((LONG *)&blob->refcount);
|
||||
|
||||
TRACE("%p decreasing refcount to %u.\n", blob, refcount);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user