libs/vkd3d: Fix InterlockedIncrement() and InterlockedDecrement() signatures.

This commit is contained in:
Józef Kucia 2016-10-10 11:22:50 +02:00
parent 5f3d5a1263
commit ed033b40d0
3 changed files with 13 additions and 13 deletions

View File

@ -38,7 +38,7 @@
#ifndef _WIN32
# if HAVE_SYNC_ADD_AND_FETCH
static inline ULONG InterlockedIncrement(ULONG volatile *x)
static inline LONG InterlockedIncrement(LONG volatile *x)
{
return __sync_add_and_fetch(x, 1);
}
@ -47,7 +47,7 @@ static inline ULONG InterlockedIncrement(ULONG volatile *x)
# endif /* HAVE_SYNC_ADD_AND_FETCH */
# if HAVE_SYNC_SUB_AND_FETCH
static inline ULONG InterlockedDecrement(ULONG volatile *x)
static inline LONG InterlockedDecrement(LONG volatile *x)
{
return __sync_sub_and_fetch(x, 1);
}

View File

@ -84,8 +84,8 @@ void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const ch
static char *get_buffer(void)
{
static char buffers[64][VKD3D_DEBUG_BUFFER_SIZE];
static ULONG buffer_index;
ULONG current_index;
static LONG buffer_index;
LONG current_index;
current_index = InterlockedIncrement(&buffer_index) % ARRAY_SIZE(buffers);
return buffers[current_index];

View File

@ -74,7 +74,7 @@ HRESULT vkd3d_stop_fence_worker(struct vkd3d_fence_worker *worker) DECLSPEC_HIDD
struct d3d12_fence
{
ID3D12Fence ID3D12Fence_iface;
ULONG refcount;
LONG refcount;
UINT64 value;
pthread_mutex_t mutex;
@ -97,7 +97,7 @@ HRESULT d3d12_fence_create(struct d3d12_device *device,
struct d3d12_resource
{
ID3D12Resource ID3D12Resource_iface;
ULONG refcount;
LONG refcount;
D3D12_RESOURCE_DESC desc;
@ -152,7 +152,7 @@ struct d3d12_dsv_desc
struct d3d12_descriptor_heap
{
ID3D12DescriptorHeap ID3D12DescriptorHeap_iface;
ULONG refcount;
LONG refcount;
D3D12_DESCRIPTOR_HEAP_DESC desc;
@ -168,7 +168,7 @@ HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device,
struct d3d12_root_signature
{
ID3D12RootSignature ID3D12RootSignature_iface;
ULONG refcount;
LONG refcount;
VkPipelineLayout vk_pipeline_layout;
@ -182,7 +182,7 @@ HRESULT d3d12_root_signature_create(struct d3d12_device *device,
struct d3d12_pipeline_state
{
ID3D12PipelineState ID3D12PipelineState_iface;
ULONG refcount;
LONG refcount;
VkPipeline vk_pipeline;
@ -196,7 +196,7 @@ HRESULT d3d12_pipeline_state_create_compute(struct d3d12_device *device,
struct d3d12_command_allocator
{
ID3D12CommandAllocator ID3D12CommandAllocator_iface;
ULONG refcount;
LONG refcount;
D3D12_COMMAND_LIST_TYPE type;
@ -213,7 +213,7 @@ HRESULT d3d12_command_allocator_create(struct d3d12_device *device,
struct d3d12_command_list
{
ID3D12GraphicsCommandList ID3D12GraphicsCommandList_iface;
ULONG refcount;
LONG refcount;
D3D12_COMMAND_LIST_TYPE type;
ID3D12PipelineState *pipeline_state;
@ -241,7 +241,7 @@ HRESULT d3d12_command_list_create(struct d3d12_device *device,
struct d3d12_command_queue
{
ID3D12CommandQueue ID3D12CommandQueue_iface;
ULONG refcount;
LONG refcount;
D3D12_COMMAND_QUEUE_DESC desc;
@ -257,7 +257,7 @@ HRESULT d3d12_command_queue_create(struct d3d12_device *device,
struct d3d12_device
{
ID3D12Device ID3D12Device_iface;
ULONG refcount;
LONG refcount;
VkDevice vk_device;
struct vkd3d_vk_device_procs vk_procs;