You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this error is related to ImGui or MoltenVK. However, since this flickering is not observed when testing the same code in a Windows environment with NVIDIA drivers, I am raising this issue with MoltenVK.
ImGui does not support proper gamma correction for the B8G8R8A8_SRGB format. Therefore, I am using the VK_KHR_mutable_swapchain_format extension and specifying the two formats, B8G8R8A8_SRGB and B8G8R8A8_UNORM, in VkImageFormatListCreateInfo in the pNext of VkSwapchainCreateInfoKHR. During ImGui rendering, I render to the swapchain image view using the B8G8R8A8_UNORM format. Here is some of the code I am using:
When using this code, flickering occurs as shown in the video below. The validation layers, including synchronization validation, do not raise any issues.
One puzzling point is that if I do not use the mutable format for rendering (i.e., use B8G8R8A8_SRGB in the PipelineRenderingCreateInfo of ImGui_ImplVulkan_InitInfo and use swapchainImageViews instead of imGuiSwapchainImageViews), this flickering does not occur.
With mutable format
mutable-format.mov
Without mutable format (flickering not occurred)
The text was updated successfully, but these errors were encountered:
Based on several experiments, it seems to be an issue with MoltenVK. When I replaced the ImGui rendering part of the code with another rectangle rendering code, the same flickering was observed. The flickering becomes more frequent as the frame time approaches the display refresh rate (1s/120=8.3ms).
One peculiar point that not shown in the above video is that the red rectangle in the video often hide the Metal HUD.
I'm not sure if this error is related to ImGui or MoltenVK. However, since this flickering is not observed when testing the same code in a Windows environment with NVIDIA drivers, I am raising this issue with MoltenVK.
ImGui does not support proper gamma correction for the
B8G8R8A8_SRGB
format. Therefore, I am using theVK_KHR_mutable_swapchain_format
extension and specifying the two formats,B8G8R8A8_SRGB
andB8G8R8A8_UNORM
, inVkImageFormatListCreateInfo
in thepNext
ofVkSwapchainCreateInfoKHR
. During ImGui rendering, I render to the swapchain image view using theB8G8R8A8_UNORM
format. Here is some of the code I am using:When using this code, flickering occurs as shown in the video below. The validation layers, including synchronization validation, do not raise any issues.
One puzzling point is that if I do not use the mutable format for rendering (i.e., use
B8G8R8A8_SRGB
in thePipelineRenderingCreateInfo
ofImGui_ImplVulkan_InitInfo
and useswapchainImageViews
instead ofimGuiSwapchainImageViews
), this flickering does not occur.mutable-format.mov
The text was updated successfully, but these errors were encountered: