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

Vulkan Dynamic Rendering MultiViewport (dynamicRenderingUnusedAttachments) #8282

Open
DarkerMinecraft opened this issue Jan 1, 2025 · 0 comments

Comments

@DarkerMinecraft
Copy link

Version/Branch of Dear ImGui:

Version 1.91.6 Branch: docking

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp

Compiler, OS:

Windows 11, Visual Studios

Full config/build information:

No response

Details:

My setup with Vulkan to use dynamic rendering, so when implementing ImGui, I included dynamic rendering. When using multi viewports all I see is just black for the window when going outside the main window.

Here is my ImplVulkan_InitInfo
`
initInfo.Instance = device->GetInstance();
initInfo.PhysicalDevice = device->GetPhysicalDevice();
initInfo.Device = device->GetDevice();
initInfo.Queue = device->GetGraphicsQueue();
initInfo.DescriptorPool = device->GetImGuiDescriptorPool();
initInfo.MinImageCount = 3;
initInfo.ImageCount = 3;
initInfo.UseDynamicRendering = true;

initInfo.PipelineRenderingCreateInfo = { .sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO };
initInfo.PipelineRenderingCreateInfo.colorAttachmentCount = 1;

VkFormat format = VK_FORMAT_B8G8R8A8_UNORM;
initInfo.PipelineRenderingCreateInfo.pColorAttachmentFormats = &format;

initInfo.MSAASamples = VK_SAMPLE_COUNT_1_BIT;

`

Validation Error: [ VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08910 ] Object 0: handle = 0x180555a8ac0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x625f640000000058, type = VK_OBJECT_TYPE_PIPELINE; | MessageID = 0x4c92b689 | vkCmdDrawIndexed(): VkRenderingInfo::pColorAttachments[0].imageView format (VK_FORMAT_B8G8R8A8_UNORM) must match corresponding format in VkPipelineRenderingCreateInfo::pColorAttachmentFormats[0] (Unhandled VkFormat). The Vulkan spec states: If the dynamicRenderingUnusedAttachments feature is not enabled, and the current render pass instance was begun with vkCmdBeginRendering and VkRenderingInfo::colorAttachmentCount greater than 0, then each element of the VkRenderingInfo::pColorAttachments array with an imageView not equal to VK_NULL_HANDLE must have been created with a VkFormat equal to the corresponding element of VkPipelineRenderingCreateInfo::pColorAttachmentFormats used to create the currently bound graphics pipeline (https://vulkan.lunarg.com/doc/view/1.3.290.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdDrawIndexed-dynamicRenderingUnusedAttachments-08910)

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
ImGui::Begin("Example Bug");
MoreCodeToExplainMyIssue();
ImGui::End();
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

2 participants