diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-06 10:17:42 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-06 10:21:32 +0200 |
commit | 61342e58315ff2d2b1320d358b453bf50a972ac0 (patch) | |
tree | 6ecb6daf05c4c572ebf461c964ee7c58daaa90d4 /drivers/vulkan/vulkan_context.cpp | |
parent | 94fab213482fd944debc50e255e7b395d391cc33 (diff) | |
download | redot-engine-61342e58315ff2d2b1320d358b453bf50a972ac0.tar.gz |
Vulkan: Use VK_NULL_HANDLE for handles, fixes 32-bit builds
Some Vulkan types are defined as "non dispatchable handles" and use a
different typedef on 32-bit and 64-bit systems (struct pointer on
64-bit, `uint64_t` otherwise).
https://github.com/KhronosGroup/Vulkan-Headers/blob/0e78ffd1dcfc3e9f14a966b9660dbc59bd967c5c/include/vulkan/vulkan_core.h#L59-L65
Contrarily to `NULL`, `nullptr` can't be converted to `uint64_t` so
build was now failing on 32-bit after converting the codebase from
using `NULL` to `nullptr`.
Fixes #37620.
Diffstat (limited to 'drivers/vulkan/vulkan_context.cpp')
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index d3666bca52..68b4cdf4a4 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -937,7 +937,7 @@ Error VulkanContext::_update_swap_chain(Window *window) { /*compositeAlpha*/ compositeAlpha, /*presentMode*/ swapchainPresentMode, /*clipped*/ true, - /*oldSwapchain*/ nullptr, + /*oldSwapchain*/ VK_NULL_HANDLE, }; err = fpCreateSwapchainKHR(device, &swapchain_ci, nullptr, &window->swapchain); |