-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Dynamic rendering and Vulkan 1.3 and higher #8326
Comments
Thank you for your report. Would using compile-time e.g We currently do this: #if defined(VK_VERSION_1_3) || defined(VK_KHR_dynamic_rendering)
#define IMGUI_IMPL_VULKAN_HAS_DYNAMIC_RENDERING
#endif The loading code is currently in two locations I'm going to share the existing code to facilitate further updates. |
Thanks for the quick reply! Someone could still create its Example VkApplicationInfo appInfo{
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pApplicationName = m_settings.applicationName,
.applicationVersion = VK_MAKE_VERSION(1, 0, 0),
.pEngineName = "My Engine",
.engineVersion = VK_MAKE_VERSION(1, 0, 0),
.apiVersion = VK_VERSION_1_2; /// m_settings.apiVersion,
};
VkInstanceCreateInfo createInfo{
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
.pNext = m_settings.instanceCreateInfoExt,
.pApplicationInfo = &appInfo,
.enabledLayerCount = uint32_t(layers.size()),
.ppEnabledLayerNames = layers.data(),
.enabledExtensionCount = uint32_t(m_settings.instanceExtensions.size()),
.ppEnabledExtensionNames = m_settings.instanceExtensions.data(),
};
VkResult result = vkCreateInstance(&createInfo, m_settings.alloc, &m_instance); In this case the API will be 1.2 and the 1.3 features will not be available. |
My suggestion was to make it backward compatible. But since Vulkan 1.4 is out, and 1.3 has been around for quite a while, we could assume that Vulkan applications these days always use 1.3 and up. But I could be wrong. |
If you are looking for a test application, there is the NVIDIA nvpro-sample vk_minimal_latest. If the fix works the line 900 could be removed. P-S. This sample will be updated using Vulkan 1.4 on Monday, with the release of the NVIDIA driver supporting Vulkan 1.4, or delayed if the driver isn't published. |
Version/Branch of Dear ImGui:
Version 1.91,3, Branch : docking
Back-ends:
imgui_impl_vulkan.cpp
Compiler, OS:
Windows 11
Full config/build information:
No response
Details:
With dynamic rendering active, the Vulkan backend loads vkCmdBeginRenderingKHR and vkCmdEndRenderingKHR, but those are only valid when the extension
VK_KHR_dynamic_rendering
was added to the device creation, where vkCmdBeginRendering and vkCmdEndRendering (without KHR), exists if the Vulkan 1.3 API is used.See vkCmdBeginRenderingKHR specification.
My suggestion would be to add to
ImGui_ImplVulkan_InitInfo
an.ApiVersion
and do something likeScreenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
I don't have the example public yet, but found this while porting and modernizing https://github.com/nvpro-samples/vk_mini_samples to Vulkan 1.4
The text was updated successfully, but these errors were encountered: