mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-05 20:22:59 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user