summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2023-01-08 15:41:25 +0100
committersfan5 <sfan5@live.de>2023-01-24 16:39:33 +0100
commit9f6e1b3ba18c2314d13b8ed763cf1a3a2f60fcd5 (patch)
tree22fe37c0251fd6ba5e945ce7b919cd37dd4106d2
parent688a321dbb460a2e3d67b5f61941994fcc650773 (diff)
downloadmpv-9f6e1b3ba18c2314d13b8ed763cf1a3a2f60fcd5.tar.bz2
mpv-9f6e1b3ba18c2314d13b8ed763cf1a3a2f60fcd5.tar.xz
vulkan: fix build error for 32bit builds with clang
vk->surface is a handle and not a pointer, so assign VK_NULL_HANDLE. This fixes the following build error on 32bit Windows when using clang for example, which errors out when assigning a 32bit pointer to a 64bit integer: ../mpv-0.35.0/video/out/vulkan/utils.c:37:21: error: incompatible pointer to integer conversion assigning to 'VkSurfaceKHR' (aka 'unsigned long long') from 'void *' [-Wint-conversion] vk->surface = NULL; ^ ~~~~
-rw-r--r--video/out/vulkan/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/vulkan/utils.c b/video/out/vulkan/utils.c
index 14b1ed7bc4..57a36645c1 100644
--- a/video/out/vulkan/utils.c
+++ b/video/out/vulkan/utils.c
@@ -34,7 +34,7 @@ void mpvk_uninit(struct mpvk_ctx *vk)
if (vk->surface) {
assert(vk->vkinst);
vkDestroySurfaceKHR(vk->vkinst->instance, vk->surface, NULL);
- vk->surface = NULL;
+ vk->surface = VK_NULL_HANDLE;
}
pl_vk_inst_destroy(&vk->vkinst);