mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[vulkan] Fix some 32-bit compatibility issues
mostly dealing with vulkan's handles always being 64-bit, but pointers being either 32 or 64.
This commit is contained in:
parent
c9f9c1e36b
commit
e50a079f72
5 changed files with 22 additions and 7 deletions
|
@ -1,6 +1,19 @@
|
|||
#ifndef __QF_Vulkan_debug_h
|
||||
#define __QF_Vulkan_debug_h
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
#define QFV_duCmdBeginLabel(device, cmd, name...)
|
||||
#define QFV_duCmdEndLabel(device, cmd)
|
||||
#define QFV_duCmdInsertLabel(device, cmd, name...)
|
||||
#define QFV_duCreateMessenger(inst, severity, type, callback, data, messenger)
|
||||
#define QFV_duDestroyMessenger(inst, messenger)
|
||||
#define QFV_duQueueBeginLabel(device, queue, name...)
|
||||
#define QFV_duQueueEndLabel(device, queue)
|
||||
#define QFV_duQueueInsertLabel(device, queue, name...)
|
||||
#define QFV_duSetObjectName(device, type, handle, name)
|
||||
#define QFV_duSetObjectTag(device, type, handle, name, size, tag)
|
||||
#define QFV_duSubmitMessage(inst, severity, types, data)
|
||||
#else
|
||||
#define QFV_duCmdBeginLabel(device, cmd, name...)\
|
||||
do { \
|
||||
qfv_devfuncs_t *dfunc = device->funcs; \
|
||||
|
@ -111,5 +124,6 @@
|
|||
data); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif//__QF_Vulkan_debug_h
|
||||
|
|
|
@ -619,10 +619,10 @@ vulkan_vid_render_choose_visual (void)
|
|||
cmdset);
|
||||
vulkan_ctx->cmdbuffer = cmdset->a[0];
|
||||
vulkan_ctx->fence = QFV_CreateFence (vulkan_ctx->device, 1);
|
||||
Sys_MaskPrintf (SYS_vulkan, "vk choose visual %p %p %d %p\n",
|
||||
Sys_MaskPrintf (SYS_vulkan, "vk choose visual %p %p %d %#zx\n",
|
||||
vulkan_ctx->device->dev, vulkan_ctx->device->queue.queue,
|
||||
vulkan_ctx->device->queue.queueFamily,
|
||||
vulkan_ctx->cmdpool);
|
||||
(size_t) vulkan_ctx->cmdpool);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -630,7 +630,8 @@ vulkan_vid_render_create_context (void)
|
|||
{
|
||||
vulkan_ctx->create_window (vulkan_ctx);
|
||||
vulkan_ctx->surface = vulkan_ctx->create_surface (vulkan_ctx);
|
||||
Sys_MaskPrintf (SYS_vulkan, "vk create context %p\n", vulkan_ctx->surface);
|
||||
Sys_MaskPrintf (SYS_vulkan, "vk create context %#zx\n",
|
||||
(size_t) vulkan_ctx->surface);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -1345,8 +1345,8 @@ QFV_ParseFramebuffer (vulkan_ctx_t *ctx, plitem_t *plist, plitem_t *properties)
|
|||
|
||||
VkFramebuffer framebuffer;
|
||||
dfunc->vkCreateFramebuffer (device->dev, &cInfo, 0, &framebuffer);
|
||||
Sys_MaskPrintf (SYS_vulkan_parse, "framebuffer, renderPass: %p, %p\n",
|
||||
framebuffer, cInfo.renderPass);
|
||||
Sys_MaskPrintf (SYS_vulkan_parse, "framebuffer, renderPass: %#zx, %#zx\n",
|
||||
(size_t) framebuffer, (size_t) cInfo.renderPass);
|
||||
|
||||
delete_memsuper (memsuper);
|
||||
return framebuffer;
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
#include "r_internal.h"
|
||||
#include "vid_vulkan.h"
|
||||
|
||||
static const char *alias_pass_names[] = {
|
||||
static const char * __attribute__((used)) alias_pass_names[] = {
|
||||
"depth",
|
||||
"g-buffer",
|
||||
"translucent",
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
#include "r_internal.h"
|
||||
#include "vid_vulkan.h"
|
||||
|
||||
static const char *bsp_pass_names[] = {
|
||||
static const char * __attribute__((used)) bsp_pass_names[] = {
|
||||
"depth",
|
||||
"g-buffer",
|
||||
"sky",
|
||||
|
|
Loading…
Reference in a new issue