Skip to content

Conversation

@werman
Copy link
Contributor

@werman werman commented Dec 8, 2025

RenderDoc allows only one simultaneously existing logical device, and vulkaninfo doesn't have a real need to keep them simultaneously alive.

Running vulkaninfo under RenderDoc is useful to get a Vulkan profile that will represent the RenderDoc capabilities on the current GPU, which can be useful to, e.g., make a gfxreconstruct trace that will be later capturable by RenderDoc.

With the change ENABLE_VULKAN_RENDERDOC_CAPTURE=1 vulkaninfo crashes with:

ERROR: [RDOC] Code 1 : RenderDoc does not support multiple simultaneous logical devices.
ERROR at /usr/src/debug/vulkan-tools/Vulkan-Tools/vulkaninfo/./vulkaninfo.h:1723:vkCreateDevice failed with ERROR_INITIALIZATION_FAILED

@ci-tester-lunarg
Copy link

Author werman not on autobuild list. Waiting for curator authorization before starting CI build.

1 similar comment
@ci-tester-lunarg
Copy link

Author werman not on autobuild list. Waiting for curator authorization before starting CI build.

@CLAassistant
Copy link

CLAassistant commented Dec 8, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@charles-lunarg charles-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, but can we leave the VkDevice object at the parent scope so that if an exception is thrown, the AppGpu can clean up the created VkDevice handle.

This means that the commit is adding vkDestroyDevice(dev, nullptr); dev = VK_NULL_HANDLE; at the end of the constructor, then in the destructor only destroying the device if the handle isn't NULL.

RenderDoc allows only one simultaneously existing logical device, and
vulkaninfo doesn't have a real need to keep them simultaneously alive.

Running vulkaninfo under RenderDoc is useful to get a Vulkan profile
that will represent the RenderDoc capabilities on the current GPU,
which can be useful to, e.g., make a gfxreconstruct trace that will be
later capturable by RenderDoc.

Signed-off-by: Danylo Piliaiev <[email protected]>
@werman werman force-pushed the fix/vulkaninfo-with-renderdoc branch from eb6cd49 to b6abaf7 Compare December 8, 2025 16:31
@werman
Copy link
Contributor Author

werman commented Dec 8, 2025

This means that the commit is adding vkDestroyDevice(dev, nullptr); dev = VK_NULL_HANDLE; at the end of the constructor, then in the destructor only destroying the device if the handle isn't NULL.

Makes sense, done.

Copy link
Contributor

@charles-lunarg charles-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build queued with queue ID 596382.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1880 running.

@ci-tester-lunarg
Copy link

CI Vulkan-Tools build # 1880 passed.

@charles-lunarg charles-lunarg merged commit 54587dc into KhronosGroup:main Dec 8, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants