summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2023-01-08 15:41:25 +0100
committersfan5 <sfan5@live.de>2023-01-08 16:09:01 +0100
commit96773f39e17f59bcf6bb383e521853aea19c8177 (patch)
treea70c5d444106fb4eb3f8d9fd73d83c3f797f648c /video/out
parent8a0fa62b5845fb512c2608580da65564270da1ce (diff)
downloadmpv-96773f39e17f59bcf6bb383e521853aea19c8177.tar.bz2
mpv-96773f39e17f59bcf6bb383e521853aea19c8177.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; ^ ~~~~
Diffstat (limited to 'video/out')
-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);