-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Vulkan : add helpers to ease screenshot generation with multi viewports #8946
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
Vulkan : add helpers to ease screenshot generation with multi viewports #8946
Conversation
…inImageUsage in ImGui_ImplVulkan_InitInfo
|
Hello, I have merged a first commit e639ff3 which include only |
|
Hi, Thanks. Just to know for another time, would you have preferred if I made 2 PR (one for ImGui_ImplVulkanH_GetWindowDataFromViewport and the other one for the image flag) ? As it is two tiny changes I wanted to avoid pollution, but on the other hand it is always good to split topics... |
|
Making two commits in the same PR would be nice for this sorts of thing. But the first change is so simple it was easy to isolate that. For the second change: I would like to look more globally at all the Vulkan related requests to configure how secondary viewports are created, and possibly work on those together. if you feel like inspecting all vulkan issues to list ones related or even perhaps come with a more global plan that’d be nice, but otherwise I’ll tackle this at some point either way. |
|
Right, I though there were more, but I reviewed the list and I agree that's all there is. Reference, for others backends |
|
#8585 is solved now. Some more at #8111 (comment) |
|
I have pushed a couple of rework of the Vulkan backend:
As a result this (and therefore #8940) should be solved, but please confirm! |
|
I was seeing SwapchainImageUsage as additional flags (ie I need to set With latest commit e4e3c2c I have crash or error at each frame, which is more anoying me. I diffed your changes and didn't find yet the cause. I think it is due to using The main viewport is fine, but when I create a second one, if I set
If I set the
|
|
Ok got it, it is because you are passing my (main, 8 bits) render pass when creating secondary pipelines instead of passing the secondary (1 bit one, attached to the window). Then the copy at line 1326 After the fix I only have the issue about semaphore, which was present before, I saw an issue about this #8923 |
Seems sensible. Pushed this change bad3c14.
Hmm... this means that |
|
Yes in my understanding ImGui_ImplVulkan_PipelineInfo::RenderPass, Subpass and MSAASamples shall be set only for main viewport (I didn't look for PipelineRenderingCreateInfo as I don't have dynamic rendering). But I'm not a Vulkan expert at all... |
|
I pushed 1f020e5 |
Followup to issue #8940.
ImGui_ImplVulkanH_Window* ImGui_ImplVulkan_GetWindowDataFromViewport(ImGuiViewport* viewport)to retrieve the window related to a viewport. I tested it for screenshot generation, but usage could be wider.SwapchainImageUsageto structImGui_ImplVulkan_InitInfoto be able to specify additional usage for swapchain images (eg VK_IMAGE_USAGE_TRANSFER_SRC_BIT for a screenshot). This adds an argument toImGui_ImplVulkanH_CreateOrResizeWindow, but default value has been set to keep the examples simple.