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

apidump: feature request: Use handle formatting for uint64 values with objectType tags #2209

Open
kocdemir opened this issue Dec 2, 2024 · 0 comments
Assignees
Labels
Project - apidump apidump issues

Comments

@kocdemir
Copy link

kocdemir commented Dec 2, 2024

API dump is printing some uint64_t values, which are tagged with objecttype="objectType" in vk.xml, using the integer form. It would be much better to print them similar to the object handles to be able to easily match the usages within an API dump listing.

Example, VkDebugUtilsObjectNameInfoEXT call defined as:

<type category="struct" name="VkDebugUtilsObjectNameInfoEXT" structextends="VkPipelineShaderStageCreateInfo">
    <member values="VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT"><type>VkStructureType</type> <name>sType</name></member>
    <member optional="true">const <type>void</type>*                                            <name>pNext</name></member>
    <member><type>VkObjectType</type>                                           <name>objectType</name></member>
    <member objecttype="objectType"><type>uint64_t</type>                                               <name>objectHandle</name></member>
    <member optional="true" len="null-terminated">const <type>char</type>*      <name>pObjectName</name></member>
</type>

Currently the dump generates output like:

vkCreateImageView(device, pCreateInfo, pAllocator, pView) returns VkResult VK_SUCCESS (0):
 device:                         VkDevice = 00000193F9169AA0 [AEMU_Device]
 pCreateInfo:                    const VkImageViewCreateInfo* = 0000004E451653E0:
  ...
 pView:                          VkImageView* = 00000193F95EC0D0

vkSetDebugUtilsObjectNameEXT(device, pNameInfo) returns VkResult VK_SUCCESS (0):
 device:                         VkDevice = 00000193F9169AA0 [AEMU_Device]
 pNameInfo:                      const VkDebugUtilsObjectNameInfoEXT* = 0000004E451650F0:
  sType:                          VkStructureType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT (1000128000)
  pNext:                          const void* = NULL
  objectType:                     VkObjectType = VK_OBJECT_TYPE_IMAGE_VIEW (14)
  objectHandle:                   uint64_t = 1735055556816    <---  Feature request: print this as 00000193F95EC0D0 instead
  pObjectName:                    const char* = "ColorBuffer:1"

And when the object is named, would be good to see the same formatting with the name of the object as well, similar to

vkDestroyImageView(device, imageView, pAllocator) returns void:
 device:                         VkDevice = 00000193F9169AA0 [AEMU_Device]
 imageView:                      VkImageView = 00000193F95EC0D0 [ColorBuffer:1]
 pAllocator:                     const VkAllocationCallbacks* = NULL

This would be quite useful especially for some extension functions like vkSetPrivateDataEXT.

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

No branches or pull requests

3 participants