From c71fa87522cff2a14ae18d76bb72d94b71e04b8c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 23 Jan 2024 18:19:52 +0100 Subject: [PATCH] vkd3d: Use vkd3d_atomic_increment_u32() in d3d12_pipeline_state_AddRef(). --- libs/vkd3d/state.c | 4 ++-- libs/vkd3d/vkd3d_private.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 4d8fdcb3..b818feb5 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1984,7 +1984,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_pipeline_state_QueryInterface(ID3D12Pipel static ULONG STDMETHODCALLTYPE d3d12_pipeline_state_AddRef(ID3D12PipelineState *iface) { struct d3d12_pipeline_state *state = impl_from_ID3D12PipelineState(iface); - ULONG refcount = InterlockedIncrement(&state->refcount); + unsigned int refcount = vkd3d_atomic_increment_u32(&state->refcount); TRACE("%p increasing refcount to %u.\n", state, refcount); @@ -2027,7 +2027,7 @@ static void d3d12_pipeline_uav_counter_state_cleanup(struct d3d12_pipeline_uav_c static ULONG STDMETHODCALLTYPE d3d12_pipeline_state_Release(ID3D12PipelineState *iface) { struct d3d12_pipeline_state *state = impl_from_ID3D12PipelineState(iface); - ULONG refcount = InterlockedDecrement(&state->refcount); + unsigned int refcount = InterlockedDecrement((LONG *)&state->refcount); TRACE("%p decreasing refcount to %u.\n", state, refcount); diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 7567a7fc..d46f434d 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1288,7 +1288,7 @@ struct d3d12_pipeline_uav_counter_state struct d3d12_pipeline_state { ID3D12PipelineState ID3D12PipelineState_iface; - LONG refcount; + unsigned int refcount; union {