From 80ed4eba87a5e624ff1d8e3b17620dbd032a3571 Mon Sep 17 00:00:00 2001 From: Cort <1944792+cdwfs@users.noreply.github.com> Date: Tue, 24 Aug 2021 12:53:54 -0700 Subject: [PATCH] Backends: Vulkan: non-dispatchable handles should compare to VK_NULL_HANDLE, not NULL (#4475) --- backends/imgui_impl_vulkan.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/imgui_impl_vulkan.cpp b/backends/imgui_impl_vulkan.cpp index 3533263a5..40dd0bcdd 100644 --- a/backends/imgui_impl_vulkan.cpp +++ b/backends/imgui_impl_vulkan.cpp @@ -696,7 +696,7 @@ static void ImGui_ImplVulkan_CreateShaderModules(VkDevice device, const VkAlloca { // Create the shader modules ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData(); - if (bd->ShaderModuleVert == NULL) + if (bd->ShaderModuleVert == VK_NULL_HANDLE) { VkShaderModuleCreateInfo vert_info = {}; vert_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; @@ -705,7 +705,7 @@ static void ImGui_ImplVulkan_CreateShaderModules(VkDevice device, const VkAlloca VkResult err = vkCreateShaderModule(device, &vert_info, allocator, &bd->ShaderModuleVert); check_vk_result(err); } - if (bd->ShaderModuleFrag == NULL) + if (bd->ShaderModuleFrag == VK_NULL_HANDLE) { VkShaderModuleCreateInfo frag_info = {}; frag_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; @@ -1227,7 +1227,7 @@ void ImGui_ImplVulkanH_CreateWindowSwapChain(VkPhysicalDevice physical_device, V { VkResult err; VkSwapchainKHR old_swapchain = wd->Swapchain; - wd->Swapchain = NULL; + wd->Swapchain = VK_NULL_HANDLE; err = vkDeviceWaitIdle(device); check_vk_result(err);