mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 07:40:22 +01:00
Backends: Vulkan: non-dispatchable handles should compare to VK_NULL_HANDLE, not NULL (#4475)
This commit is contained in:
parent
780c1ee265
commit
80ed4eba87
@ -696,7 +696,7 @@ static void ImGui_ImplVulkan_CreateShaderModules(VkDevice device, const VkAlloca
|
|||||||
{
|
{
|
||||||
// Create the shader modules
|
// Create the shader modules
|
||||||
ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
|
ImGui_ImplVulkan_Data* bd = ImGui_ImplVulkan_GetBackendData();
|
||||||
if (bd->ShaderModuleVert == NULL)
|
if (bd->ShaderModuleVert == VK_NULL_HANDLE)
|
||||||
{
|
{
|
||||||
VkShaderModuleCreateInfo vert_info = {};
|
VkShaderModuleCreateInfo vert_info = {};
|
||||||
vert_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_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);
|
VkResult err = vkCreateShaderModule(device, &vert_info, allocator, &bd->ShaderModuleVert);
|
||||||
check_vk_result(err);
|
check_vk_result(err);
|
||||||
}
|
}
|
||||||
if (bd->ShaderModuleFrag == NULL)
|
if (bd->ShaderModuleFrag == VK_NULL_HANDLE)
|
||||||
{
|
{
|
||||||
VkShaderModuleCreateInfo frag_info = {};
|
VkShaderModuleCreateInfo frag_info = {};
|
||||||
frag_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_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;
|
VkResult err;
|
||||||
VkSwapchainKHR old_swapchain = wd->Swapchain;
|
VkSwapchainKHR old_swapchain = wd->Swapchain;
|
||||||
wd->Swapchain = NULL;
|
wd->Swapchain = VK_NULL_HANDLE;
|
||||||
err = vkDeviceWaitIdle(device);
|
err = vkDeviceWaitIdle(device);
|
||||||
check_vk_result(err);
|
check_vk_result(err);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user