Skip to content

[Spec XML] Adding missing validstructs attribute. - #2858

Open
coki04 wants to merge 1 commit into
KhronosGroup:mainfrom
coki04:validstructs.arm
Open

coki04 wants to merge 1 commit into
KhronosGroup:mainfrom
coki04:validstructs.arm

Conversation

@coki04

@coki04 coki04 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM lacks validstructs on a VkBaseOutStructure* abstract return.

Adding the two valid structures currently specified in the spec. This is in line with what's done at vkGetPipelinePropertiesEXT.

…ertiesARM lacks validstructs on a VkBaseOutStructure* abstract return.

Adding the two valid structures currently specified in the spec.
This is in line with what's done at vkGetPipelinePropertiesEXT.
@oddhack

oddhack commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

This is failing CI, but I think the cause of failure is something that needs to be tweaked in Vulkan-Hpp. Raised an issue over there.

@coki04

coki04 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

This is failing CI, but I think the cause of failure is something that needs to be tweaked in Vulkan-Hpp. Raised an issue over there.

That's my view as well, according to registry.adoc:

  • attr:validstructs - optional.
    Allowed only when the parameter type is a pointer to an abstract
    VkBaseInStructure or VkBaseOutStructure type.
    This is a comma-separated list of structures which can either be
    passed as the parameter, or can appear anywhere in the pNext chain of
    the parameter.

Regards,
Adrián

@oddhack

oddhack commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Andreas pushed a fix to Vulkan-Hpp and I re-ran CI here, looks good now.

@kpet

kpet commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Whether specific structures are valid depends on input parameters to vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM as well. If we want to use validstructs it would have to be the union of all structures that can possibly be used but without a guarantee that specific structures can always be used. This list is likely to grow quite big over time. These two reasons initially made me decide against the use of validstructs.

@coki04

coki04 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Whether specific structures are valid depends on input parameters to vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM as well. If we want to use validstructs it would have to be the union of all structures that can possibly be used but without a guarantee that specific structures can always be used. This list is likely to grow quite big over time. These two reasons initially made me decide against the use of validstructs.

Thanks for the reply @kpet .
In such case then I believe it would be suitable to borrow the solution they apply at the OpenXR XML registry.

vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM would return the following struct instead of vkBaseOut
<type category="struct" name="VkQueueFamilyDataGraphPropertyBaseHeaderARM">
<member><type>VkStructureType</type> <name>sType</name></member>
<member optional="true">struct <type>void</type>* <name>pNext</name></member>
</type>
Note no values attribute for VkStructureType "VK_STRUCTURE_TYPE_..." so it can't be instantiated by itself.

Then the, for now, two possible structures would include the following attribute: parentstruct="VkQueueFamilyDataGraphPropertyBaseHeaderARM"

OpenXR XML Registry:

** parentstruct - Indicates a polymorphic parent struct for this type,
usually ending in BaseHeader, such that this type begins with the same
members as the parent and may be used in place of the parentstruct
type.
Only available for structures, that is, where category="struct".

The background is that I'm building Vulkan and OpenXR C# bindings where you can specify the return parameter for those functions that allow multiple returned types via generics. i.e.:

physicalDevice.GetFeatures2<PhysicalDeviceMultiviewFeatures>()

vkGetPhysicalDeviceQueueFamilyDataGraphEngineOperationPropertiesARM is presently the only function which possible returned types can't be deducted at all from the registry.

Regards,
Adrián

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.

3 participants