Skip to content
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

Multi-Viewport Issue when moving UI window #3455

Closed
AppledoreM opened this issue Sep 3, 2020 · 6 comments
Closed

Multi-Viewport Issue when moving UI window #3455

AppledoreM opened this issue Sep 3, 2020 · 6 comments

Comments

@AppledoreM
Copy link

Version: 1.79
Branch: docking

Back-ends: imgui_impl_vulkan.cpp + imgui_impl_glfw.cpp
Compiler: MSCV
Operating System: Windows 10

Hi, I am trying to incorporate ImGui into my own engine. I'm using the multi-viewport feature. However, every time I move an ImGui UI window out of the main window of my engine, the following error shows up:

validation layer: Validation Error: [ VUID-vkCmdDrawIndexed-renderPass-02684 ] Object 0: handle = 0x81cab8000000009d, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0xaff08a000000006f, type = VK_OBJECT_TYPE_RENDER_PASS; | MessageID = 0x8cb637c2 | vkCmdDrawIndexed(): RenderPasses incompatible between active render pass w/ VkRenderPass 0x81cab8000000009d[] and pipeline state object w/ VkRenderPass 0xaff08a000000006f[] Attachment 4294967295 is not compatible with 1: The first is unused while the second is not.. The Vulkan spec states: The current render pass must be compatible with the renderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCmdDrawIndexed-renderPass-02684)

As long as the UI window stays in the main window, this error will not show up. I saw a similar error in this post #3253. I pretty new to vulkan, so I'm not sure what I should do here. Should I expect this to be fixed and just ignore this error for now?

@ocornut
Copy link
Owner

ocornut commented Sep 3, 2020

Hello,
If it looks the same as #3253 may add to that issue? A thoughtful fix would be welcome, I am also not much of a Vulkan users and don't have much bandwidth or experience to debug the use of this ever evolving SDK.

@AppledoreM
Copy link
Author

It is not exactly the same though. That one is related to docking. But, I think it is reasonable to add to that issue. Should I just close this issue then?

@FunMiles
Copy link
Contributor

FunMiles commented Sep 6, 2020

@AppledoreM I think it is the same issue. You can try my pull request #3459 and see if that fixes it.

@AppledoreM
Copy link
Author

@AppledoreM I think it is the same issue. You can try my pull request #3459 and see if that fixes it.

Yes!! I have just tested your pull request. It definitely fixes the bug. Thank you! 👍

@FunMiles
Copy link
Contributor

FunMiles commented Sep 7, 2020

I'm glad my PR worked for you. I guess it did work because you, like me, were creating your own full Vulkan state and passing it to the ImGui Vulkan implementation before doing anything else.
However, my initial PR did break the demo. I've pushed a few more changes to allow the example to work. It keeps my own code, similar to yours working. So, once the PR is merged, I recommend you try the merged code. Or if you want, try it now and let me know.

ocornut pushed a commit that referenced this issue Sep 8, 2020
…dows from the one created with the user's render-pass. (#3455, #3459)

This is mostly for the benefit of multi-viewports.
ocornut added a commit that referenced this issue Sep 8, 2020
@ocornut
Copy link
Owner

ocornut commented Sep 8, 2020

Merged the code in #3459 (with some changes, see there for details).
Thanks @FunMiles !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants