Reputation: 68618
What does noautovalidity
mean on a struct member definition in the Vulkan API schema (vk.xml
)?
registry.rnc
says tag stating that no automatic validity language should be generated
The Vulkan registry spec says: prevents automatic validity language being generated for the tagged item. Only suppresses item-specific validity - parenting issues etc. are still captured. It must also be used for structures that have no implicit validity when such structure has explicit validity.
What is automatic validity language?
What is an example of something that has noautovalidity, and of that example, what was the item-specific validity that is suppressed? and why was it decided to be suppressed?
Upvotes: 0
Views: 248
Reputation: 13246
Consult the XML schema doc.
noautovalidity
means most Valid Usage (Implicit) entries will not be generated for a given parameter or structure member.
It may mean Implicit Validity rules do not apply to the given item, although many times very similar Explicit VU is given in its place.
Examples:
VkWriteDescriptorSet::pImageInfo
has noautovalidity
because it shares descriptorCount
. It prevents generating something like "pImageInfo
has to be an array of descriptorCount
elements". Instead Explicit VU is given, e.g.: "If descriptorType
is *_IMAGE
, then pImageInfo
has to be an array of descriptorCount
elements`.
VkComputePipelineCreateInfo::basePipelineHandle
is noautovalidity
because the API allows the parameter to be ignored if flags
does not contain VK_PIPELINE_CREATE_DERIVATIVE_BIT
. Without the attribute the spec would insist the handle has to be a valid VkPipeline
(or additionally allowed to be VK_NULL_HANDLE
if optional
).
Corner case example:
VkViewport::x
is noautovalidity
. It does not seemingly need noautovalidity
, but in this case it signifies that although the struct has no Implicit Validity, some Explicit Validity may be present in the spec.
Upvotes: 4