-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backends: Vulkan: Support for dynamic_rendering #5037
Conversation
3862d88
to
de64059
Compare
Hello, Thanks for the PR. In particular, Thanks! |
Hello @ocornut, |
Any of the examples where the ViewportEnable configuration flag is set will demonstrate use of multi-viewports.
See wiki https://github.com/ocornut/imgui/wiki/Multi-Viewports for a description of that feature.
|
Took me a few hours but I got a master build of MoltenVK to run on this Mac and managed to get the example_glfw_vulkan with some minor modifications so that it uses this feature to work, and I guess this looks correct? I also pushed a small edit, but I want to make a few changes first. Hang tight :) |
Ok @ocornut this is good to go now. If you want to see what I changed in the example (or perhaps want a new one in this repo?), see here: spnda@3ffcea4. |
When I try to run this it fails when I try to drag an imgui window, with the validation error
in |
Also @ocornut, any updates on merge status for this PR? |
Hello @spnda, sorry i was waiting on a commit for docking. Could you open or rework this PR over |
For reference, attached is the patch to enable dynamic rendering in GLFW+Vulkan's main.cpp: imgui-5ac7227-Examples GLFW+Vulkan Add compile-time flag to use Dynamic Rendering (5446).patch |
With the
VK_KHR_dynamic_rendering
extension Vulkan received a whole new way of how to rasterize. In the end, it got rid ofVkRenderPass
andVkFramebuffer
, which is the reason for me opening this PR. Developers who want to utilize the new extension, which also got made core in Vulkan 1.3, and are attempting to use its functionality would have to fallback to the oldVkRenderPass
andVkFramebuffer
system, effectively being unable to utilize anything new.With this PR, one can set a boolean in the
ImGui_ImplVulkan_InitInfo
struct while initializing the backend so that it does not require a validVkRenderPass
to be passed intoImGui_ImplVulkan_Init
. The new dynamic_rendering functionality only requires an attachment format, which is the reasoning for the newColorAttachmentFormat
member in theImGui_ImplVulkan_InitInfo
struct. This value is used while creating the pipeline instead of the render pass. The color format is allowed to be0
, orVK_FORMAT_UNDEFINED
, which is why I do not assert there. The application developer is also responsible for checking if the extension is present or if the device supports Vulkan 1.3.