mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
[vulkan] Fix compiling on 32-bit systems
Casting between ints and pointers can be awkward.
This commit is contained in:
parent
e81d690b51
commit
490cf966f9
2 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
#ifndef __QF_Vulkan_debug_h
|
||||
#define __QF_Vulkan_debug_h
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
#if (defined(_WIN32) && !defined(_WIN64)) || (__WORDSIZE < 64)
|
||||
#define QFV_duCmdBeginLabel(device, cmd, name...)
|
||||
#define QFV_duCmdEndLabel(device, cmd)
|
||||
#define QFV_duCmdInsertLabel(device, cmd, name...)
|
||||
|
|
|
@ -77,7 +77,7 @@ vkWaitForFences (VkDevice device, uint32_t fenceCount, const VkFence *fences,
|
|||
VkBool32 waitAll, uint64_t timeout)
|
||||
{
|
||||
for (uint32_t i = 0; i < fenceCount; i++) {
|
||||
int *f = (int *)fences[i];
|
||||
int *f = (int *) (intptr_t) fences[i];
|
||||
if (*f) {
|
||||
wait_count++;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ static VkResult
|
|||
vkResetFences (VkDevice device, uint32_t fenceCount, const VkFence *fences)
|
||||
{
|
||||
for (uint32_t i = 0; i < fenceCount; i++) {
|
||||
int *f = (int *)fences[i];
|
||||
int *f = (int *) (intptr_t) fences[i];
|
||||
*f = 0;
|
||||
}
|
||||
return VK_SUCCESS;
|
||||
|
@ -99,7 +99,7 @@ vkResetFences (VkDevice device, uint32_t fenceCount, const VkFence *fences)
|
|||
static VkResult
|
||||
vkGetFenceStatus (VkDevice device, VkFence fence)
|
||||
{
|
||||
int *f = (int *)fence;
|
||||
int *f = (int *) (intptr_t) fence;
|
||||
return *f ? VK_SUCCESS : VK_NOT_READY;
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ static VkResult
|
|||
vkQueueSubmit (VkQueue queue, uint32_t count, const VkSubmitInfo *submits,
|
||||
VkFence fence)
|
||||
{
|
||||
int *f = (int *)fence;
|
||||
int *f = (int *) (intptr_t) fence;
|
||||
*f = 1;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue