From: Henri Verbeet hverbeet@codeweavers.com
--- 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 4d8fdcb34..b818feb53 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 d51b110da..b22e91793 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -1281,7 +1281,7 @@ struct d3d12_pipeline_uav_counter_state struct d3d12_pipeline_state { ID3D12PipelineState ID3D12PipelineState_iface; - LONG refcount; + unsigned int refcount;
union {