Commit 03681e79 authored by Thomas Guillem's avatar Thomas Guillem

vulkan: fix incompatible pointer conversion on LP32

Handles are uint64_t on LP32, cf. VK_DEFINE_NON_DISPATCHABLE_HANDLE.
parent 9207e77b
......@@ -168,7 +168,7 @@ const struct pl_vk_inst *pl_vk_inst_create(struct pl_context *ctx,
goto error;
}
VkDebugReportCallbackEXT debug = NULL;
VkDebugReportCallbackEXT debug = VK_NULL_HANDLE;
if (params->debug) {
// Set up a debug callback to catch validation messages
VkDebugReportCallbackCreateInfoEXT dinfo = {
......
......@@ -413,7 +413,7 @@ static void tex_barrier(const struct pl_gpu *gpu, struct vk_cmd *cmd,
imgBarrier.srcAccessMask = 0;
}
VkEvent event = NULL;
VkEvent event = VK_NULL_HANDLE;
enum vk_wait_type type = vk_cmd_wait(vk, cmd, &tex_vk->sig, stage, &event);
bool need_trans = tex_vk->current_layout != newLayout ||
......@@ -513,7 +513,7 @@ static bool vk_init_image(const struct pl_gpu *gpu, const struct pl_tex *tex)
tex_vk->transfer_queue = COMPUTE;
bool ret = false;
VkRenderPass dummyPass = NULL;
VkRenderPass dummyPass = VK_NULL_HANDLE;
if (params->sampleable || params->renderable) {
static const VkImageViewType viewType[] = {
......@@ -1544,10 +1544,10 @@ static const struct pl_pass *vk_pass_create(const struct pl_gpu *gpu,
// temporary allocations
void *tmp = talloc_new(NULL);
VkPipelineCache pipeCache = NULL;
VkShaderModule vert_shader = NULL;
VkShaderModule frag_shader = NULL;
VkShaderModule comp_shader = NULL;
VkPipelineCache pipeCache = VK_NULL_HANDLE;
VkShaderModule vert_shader = VK_NULL_HANDLE;
VkShaderModule frag_shader = VK_NULL_HANDLE;
VkShaderModule comp_shader = VK_NULL_HANDLE;
int num_desc = params->num_descriptors;
if (!num_desc)
......@@ -2126,7 +2126,7 @@ static void vk_pass_run(const struct pl_gpu *gpu,
goto error;
// Find a descriptor set to use
VkDescriptorSet ds = NULL;
VkDescriptorSet ds = VK_NULL_HANDLE;
if (!pass_vk->use_pushd) {
for (int i = 0; i < PL_ARRAY_SIZE(pass_vk->dss); i++) {
uint16_t dsbit = 1u << i;
......
......@@ -429,7 +429,7 @@ static void destroy_swapchain(struct vk_ctx *vk, struct priv *p)
{
assert(p->old_swapchain);
vkDestroySwapchainKHR(vk->dev, p->old_swapchain, VK_ALLOC);
p->old_swapchain = NULL;
p->old_swapchain = VK_NULL_HANDLE;
}
static bool vk_sw_recreate(const struct pl_swapchain *sw)
......@@ -522,7 +522,7 @@ error:
PL_ERR(vk, "Failed (re)creating swapchain!");
talloc_free(vkimages);
vkDestroySwapchainKHR(vk->dev, p->swapchain, VK_ALLOC);
p->swapchain = NULL;
p->swapchain = VK_NULL_HANDLE;
return false;
}
......@@ -540,7 +540,7 @@ static bool vk_sw_start_frame(const struct pl_swapchain *sw,
for (int attempts = 0; attempts < 2; attempts++) {
uint32_t imgidx = 0;
VkResult res = vkAcquireNextImageKHR(vk->dev, p->swapchain, UINT64_MAX,
sem_in, NULL, &imgidx);
sem_in, VK_NULL_HANDLE, &imgidx);
switch (res) {
case VK_SUCCESS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment