Skip to content

Vulkan Image Transition Before Acquisition #9496

Description

@LewisJustin

Version/Branch of Dear ImGui:

Version 1.92.9b, Branch: docking

Back-ends:

imgui_impl_vulkan.cpp

Compiler, OS:

Linux + GCC

Full config/build information:

#define _DEBUG

Otherwise standard build.

Details:

When running with vulkan validation layer (main.cpp: #define _DEBUG), we get the warning:

pSubmits[0] performs a layout transition on presentable VkImage 0x60000000006, but the image has not been acquired from VkSwapchainKHR 0x40000000004 (either never or since the last present operation).
The Vulkan spec states: Use of a presentable image must occur only after the image is returned by vkAcquireNextImageKHR, and before it is released by vkQueuePresentKHR. This includes transitioning the image layout and rendering commands (https://docs.vulkan.org/refpages/latest/refpages/source/VkSwapchainKHR.html#_description)

This warning will occur on every new window or resize.

This does not cause any real issues outside of the warning spam.

From my explorations, this is caused by ImGui_ImplVulkanH_CreateOrResizeWindow

Removing everything after ImGui_ImplVulkanH_CreateWindowCommandBuffers gets rid of the warning (and the example still works).

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Use glfw + vulkan example.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions