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_object.py missing Extension Requires Depends info #531

Open
charles-lunarg opened this issue Feb 25, 2025 · 1 comment
Open

vulkan_object.py missing Extension Requires Depends info #531

charles-lunarg opened this issue Feb 25, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@charles-lunarg
Copy link
Contributor

The Vulkan XML has various depends tags attached to requires block. This data is useful for generating command dependencies on extensions, but is not accessible in vulkan_object.py.

For example, vkGetDeviceGroupSurfacePresentModes2EXT is provided by VK_EXT_full_screen_exclusive but requires either VK_KHR_device_group or VK_VERSION_1_1 to be enabled.

An XML description taken from the spec:

<extension name="VK_EXT_full_screen_exclusive" ...>           

    <require depends="VK_KHR_device_group,VK_VERSION_1_1">
        <command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
    </require>
</extension>

This was found while trying to update the Vulkan-Loader codegen to use vulkan_object.py, and while it was possible to hardcode this, it would be helpful to have this information.

@charles-lunarg charles-lunarg added the enhancement New feature or request label Feb 25, 2025
@spencer-lunarg
Copy link

Ok, trying envision how this would actually look now. Using 2 edge case of vkGetDeviceGroupPresentCapabilitiesKHR and vkGetDeviceGroupSurfacePresentModes2EXT

  1. vkGetDeviceGroupPresentCapabilitiesKHR is found in
<extension name="VK_KHR_swapchain">
    <require depends="VK_VERSION_1_1">
        <command name="vkGetDeviceGroupPresentCapabilitiesKHR"/>
    </require>
</extension>
<extension name="VK_KHR_device_group">
    <require depends="VK_KHR_surface">
        <command name="vkGetDeviceGroupPresentCapabilitiesKHR"/>
    </require>
</extension>

and going self.vk.commands['vkGetDeviceGroupPresentCapabilitiesKHR'].extensions gives you the array of VK_KHR_swapchain and VK_KHR_device_group

  1. vkGetDeviceGroupSurfacePresentModes2EXT
<extension name="VK_EXT_full_screen_exclusive">
    <require depends="VK_KHR_device_group,VK_VERSION_1_1">
        <command name="vkGetDeviceGroupSurfacePresentModes2EXT"/>
    </require>
</extension>

and going self.vk.commands['vkGetDeviceGroupSurfacePresentModes2EXT'].extensions gives you just VK_EXT_full_screen_exclusive


I guess not how to best represent this whole extension relationship together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants