Merge pull request #566 from krOoze/fixnclarify_altlen

Fix and clarify altlen
This commit is contained in:
Jon Leech 2017-10-12 15:39:47 -07:00 committed by GitHub
commit 61bb590a50
3 changed files with 14 additions and 1 deletions

View File

@ -436,6 +436,10 @@ member.
contains a `latexmath:` equation, this attribute should
be specified with an equivalent equation using only C builtin operators,
C math library function names, and variables as allowed for attr:len.
It must be a valid C99 expression whose result is equal to attr:len for
all possible inputs.
It is a comma separated list that has size equal to only the `latexmath`
item count in attr:len list.
This attribute is intended to support consumers of the XML who need to
generate validation code from the allowed length.
* attr:externsync - denotes that the member should be externally
@ -814,6 +818,10 @@ members.
contains a `latexmath:` equation, this attribute should
be specified with an equivalent equation using only C builtin operators,
C math library function names, and variables as allowed for attr:len.
It must be a valid C99 expression whose result is equal to attr:len for
all possible inputs.
It is a comma separated list that has size equal to only the `latexmath`
item count in attr:len list.
This attribute is intended to support consumers of the XML who need to
generate validation code from the allowed length.
* attr:optional - a value of `"true"` or `"false"` determines whether this

View File

@ -110,6 +110,8 @@ Types = element types {
# member of that struct, 'null-terminated' for a string, '1' to indicate it's
# just a pointer (used for nested pointers), or a latex equation (prefixed with
# 'latexmath:')
# altlen - if len has latexmath equations, this contains equivalent C99
# expressions separated by commas.
# externsync - denotes that the member should be externally synchronized
# when accessed by Vulkan
# optional - whether this value can be omitted by providing NULL (for
@ -264,6 +266,8 @@ Commands = element commands {
# member of that struct, 'null-terminated' for a string, '1' to indicate it's
# just a pointer (used for nested pointers), or a latex equation (prefixed with
# 'latexmath:')
# altlen - if len has latexmath equations, this contains equivalent C99
# expressions separated by commas.
# externsync - denotes that the member should be externally synchronized
# when accessed by Vulkan
# optional - whether this value can be omitted by providing NULL (for
@ -295,6 +299,7 @@ Command = element command {
} ,
element param {
attribute len { text } ? ,
attribute altlen { text } ? ,
attribute externsync { text } ? ,
attribute optional { text } ? ,
attribute noautovalidity { text } ? ,

View File

@ -977,7 +977,7 @@ private version is maintained in the 1.0 branch of the member gitlab server.
<member><type>VkSampleCountFlagBits</type> <name>rasterizationSamples</name><comment>Number of samples used for rasterization</comment></member>
<member><type>VkBool32</type> <name>sampleShadingEnable</name><comment>optional (GL45)</comment></member>
<member><type>float</type> <name>minSampleShading</name><comment>optional (GL45)</comment></member>
<member optional="true" len="latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil]" altlen="ceil(rasterizationSamples / 32)">const <type>VkSampleMask</type>* <name>pSampleMask</name><comment>Array of sampleMask words</comment></member>
<member optional="true" len="latexmath:[\lceil{\mathit{rasterizationSamples} \over 32}\rceil]" altlen="(rasterizationSamples + 31) / 32">const <type>VkSampleMask</type>* <name>pSampleMask</name><comment>Array of sampleMask words</comment></member>
<member><type>VkBool32</type> <name>alphaToCoverageEnable</name></member>
<member><type>VkBool32</type> <name>alphaToOneEnable</name></member>
</type>