mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Fix InterlockedIncrement() and InterlockedDecrement() signatures.
This commit is contained in:
parent
5f3d5a1263
commit
ed033b40d0
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
# if HAVE_SYNC_ADD_AND_FETCH
|
# 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);
|
return __sync_add_and_fetch(x, 1);
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ static inline ULONG InterlockedIncrement(ULONG volatile *x)
|
|||||||
# endif /* HAVE_SYNC_ADD_AND_FETCH */
|
# endif /* HAVE_SYNC_ADD_AND_FETCH */
|
||||||
|
|
||||||
# if HAVE_SYNC_SUB_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);
|
return __sync_sub_and_fetch(x, 1);
|
||||||
}
|
}
|
||||||
|
@ -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 *get_buffer(void)
|
||||||
{
|
{
|
||||||
static char buffers[64][VKD3D_DEBUG_BUFFER_SIZE];
|
static char buffers[64][VKD3D_DEBUG_BUFFER_SIZE];
|
||||||
static ULONG buffer_index;
|
static LONG buffer_index;
|
||||||
ULONG current_index;
|
LONG current_index;
|
||||||
|
|
||||||
current_index = InterlockedIncrement(&buffer_index) % ARRAY_SIZE(buffers);
|
current_index = InterlockedIncrement(&buffer_index) % ARRAY_SIZE(buffers);
|
||||||
return buffers[current_index];
|
return buffers[current_index];
|
||||||
|
@ -74,7 +74,7 @@ HRESULT vkd3d_stop_fence_worker(struct vkd3d_fence_worker *worker) DECLSPEC_HIDD
|
|||||||
struct d3d12_fence
|
struct d3d12_fence
|
||||||
{
|
{
|
||||||
ID3D12Fence ID3D12Fence_iface;
|
ID3D12Fence ID3D12Fence_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
UINT64 value;
|
UINT64 value;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
@ -97,7 +97,7 @@ HRESULT d3d12_fence_create(struct d3d12_device *device,
|
|||||||
struct d3d12_resource
|
struct d3d12_resource
|
||||||
{
|
{
|
||||||
ID3D12Resource ID3D12Resource_iface;
|
ID3D12Resource ID3D12Resource_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
D3D12_RESOURCE_DESC desc;
|
D3D12_RESOURCE_DESC desc;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ struct d3d12_dsv_desc
|
|||||||
struct d3d12_descriptor_heap
|
struct d3d12_descriptor_heap
|
||||||
{
|
{
|
||||||
ID3D12DescriptorHeap ID3D12DescriptorHeap_iface;
|
ID3D12DescriptorHeap ID3D12DescriptorHeap_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
D3D12_DESCRIPTOR_HEAP_DESC desc;
|
D3D12_DESCRIPTOR_HEAP_DESC desc;
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ HRESULT d3d12_descriptor_heap_create(struct d3d12_device *device,
|
|||||||
struct d3d12_root_signature
|
struct d3d12_root_signature
|
||||||
{
|
{
|
||||||
ID3D12RootSignature ID3D12RootSignature_iface;
|
ID3D12RootSignature ID3D12RootSignature_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
VkPipelineLayout vk_pipeline_layout;
|
VkPipelineLayout vk_pipeline_layout;
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ HRESULT d3d12_root_signature_create(struct d3d12_device *device,
|
|||||||
struct d3d12_pipeline_state
|
struct d3d12_pipeline_state
|
||||||
{
|
{
|
||||||
ID3D12PipelineState ID3D12PipelineState_iface;
|
ID3D12PipelineState ID3D12PipelineState_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
VkPipeline vk_pipeline;
|
VkPipeline vk_pipeline;
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ HRESULT d3d12_pipeline_state_create_compute(struct d3d12_device *device,
|
|||||||
struct d3d12_command_allocator
|
struct d3d12_command_allocator
|
||||||
{
|
{
|
||||||
ID3D12CommandAllocator ID3D12CommandAllocator_iface;
|
ID3D12CommandAllocator ID3D12CommandAllocator_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
D3D12_COMMAND_LIST_TYPE type;
|
D3D12_COMMAND_LIST_TYPE type;
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ HRESULT d3d12_command_allocator_create(struct d3d12_device *device,
|
|||||||
struct d3d12_command_list
|
struct d3d12_command_list
|
||||||
{
|
{
|
||||||
ID3D12GraphicsCommandList ID3D12GraphicsCommandList_iface;
|
ID3D12GraphicsCommandList ID3D12GraphicsCommandList_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
D3D12_COMMAND_LIST_TYPE type;
|
D3D12_COMMAND_LIST_TYPE type;
|
||||||
ID3D12PipelineState *pipeline_state;
|
ID3D12PipelineState *pipeline_state;
|
||||||
@ -241,7 +241,7 @@ HRESULT d3d12_command_list_create(struct d3d12_device *device,
|
|||||||
struct d3d12_command_queue
|
struct d3d12_command_queue
|
||||||
{
|
{
|
||||||
ID3D12CommandQueue ID3D12CommandQueue_iface;
|
ID3D12CommandQueue ID3D12CommandQueue_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
D3D12_COMMAND_QUEUE_DESC desc;
|
D3D12_COMMAND_QUEUE_DESC desc;
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ HRESULT d3d12_command_queue_create(struct d3d12_device *device,
|
|||||||
struct d3d12_device
|
struct d3d12_device
|
||||||
{
|
{
|
||||||
ID3D12Device ID3D12Device_iface;
|
ID3D12Device ID3D12Device_iface;
|
||||||
ULONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
VkDevice vk_device;
|
VkDevice vk_device;
|
||||||
struct vkd3d_vk_device_procs vk_procs;
|
struct vkd3d_vk_device_procs vk_procs;
|
||||||
|
Loading…
Reference in New Issue
Block a user