Merge branch '1.0' into 1.0-VK_KHR_wayland_surface

This commit is contained in:
Jon Leech 2016-05-18 20:10:06 -07:00
commit ccfaa663ce
12 changed files with 135 additions and 89 deletions

View File

@ -636,7 +636,33 @@ Internal Issues:
the result pointer may be modified for specific commands, even if a the result pointer may be modified for specific commands, even if a
runtime error is returned (internal issue 324). runtime error is returned (internal issue 324).
-----------------------------------------------------
Change log for May 20, 2016 Vulkan 1.0.14 spec update:
* Bump API patch number and header version number to 14 for this
update.
Github Issues:
* Fix validity language for sname:VkCommandBufferAllocateInfo to
impose range limits on pname:commandBufferCount (public issue 178).
* Fix validity language for flink:vkCmdExecuteCommands to refer to the
correct structure names (public issue 179).
* Fix two copy-and-paste errors in the WSI queries, where the wrong
term was used for what was being returned (public issue 206).
* Add a note in the documentation of
flink:vkGetPhysicalDeviceSurfaceFormatsKHR, about what it means if
ename:VK_FORMAT_UNDEFINED is returned (public issue 207).
Internal Issues:
* Clarify the usage and correct the name for the bitmask referenced in
<<queries-pipestats,Pipeline Statistics Queries>> (internal issue
334).
Other Commits:
* Fix the names of decorations listed in the
<<interfaces-builtin-variables,Built-in Variables>> section such
that they match the SPIR-V specification.

View File

@ -125,7 +125,7 @@ INCLUDES := $(wildcard protos/*.txt structs/*.txt flags/*.txt enums/*.txt funcpo
COMMONDOCS := $(CHAPTERS) $(INCLUDES) COMMONDOCS := $(CHAPTERS) $(INCLUDES)
# A generated included file with the spec version, date, and git commit # A generated included file with the spec version, date, and git commit
SPECVERSION = specversion.txt SPECVERSION = specversion.txt
SPECREVISION = 1.0.13 SPECREVISION = 1.0.14
SPECREMARK = SPECREMARK =
# Spec targets # Spec targets

View File

@ -200,9 +200,9 @@ of the subdivided primitive._
connecting an inner and outer edge depends only on the inner and outer connecting an inner and outer edge depends only on the inner and outer
tessellation levels corresponding to that edge and the spacing decorations._ tessellation levels corresponding to that edge and the spacing decorations._
*Rule 8* _The value of all defined components of_ code:TessellationCoord *Rule 8* _The value of all defined components of_ code:TessCoord
_will be in the range [0, 1]. Additionally, for any defined component x of_ _will be in the range [0, 1]. Additionally, for any defined component x of_
code:TessellationCoord, _the results of computing 1.0-x in a tessellation code:TessCoord, _the results of computing 1.0-x in a tessellation
evaluation shader will be exact. If any floating-point values in the range evaluation shader will be exact. If any floating-point values in the range
[0, 1] fail to satisfy this property, such values mustnot: be used as [0, 1] fail to satisfy this property, such values mustnot: be used as
tessellation coordinate components._ tessellation coordinate components._

View File

@ -131,7 +131,7 @@ literal.
In this mode, the geometry shader will execute latexmath:[$n$] times for In this mode, the geometry shader will execute latexmath:[$n$] times for
each input primitive, where latexmath:[$n$] is the number of invocations each input primitive, where latexmath:[$n$] is the number of invocations
specified in the code:OpExecutionMode instruction. The instance number is specified in the code:OpExecutionMode instruction. The instance number is
available to each invocation as a built-in input using code:InvocationID. available to each invocation as a built-in input using code:InvocationId.
[[geometry-ordering]] [[geometry-ordering]]

View File

@ -794,18 +794,18 @@ constant zero.
==== ====
-- --
code:GlobalInvocationID:: code:GlobalInvocationId::
An input variable decorated with code:GlobalInvocationID will contain the An input variable decorated with code:GlobalInvocationId will contain the
location of the current compute shader invocation within the global location of the current compute shader invocation within the global
workgroup. The value in this variable is equal to the index of the local workgroup. The value in this variable is equal to the index of the local
workgroup multiplied by the size of the local workgroup plus workgroup multiplied by the size of the local workgroup plus
code:LocalInvocationID. code:LocalInvocationId.
+ +
The code:GlobalInvocationID decoration must: be used only within compute The code:GlobalInvocationId decoration must: be used only within compute
shaders. shaders.
+ +
code:GlobalInvocationID must: be declared as a three-component vector of code:GlobalInvocationId must: be declared as a three-component vector of
32-bit integers. 32-bit integers.
code:HelperInvocation:: code:HelperInvocation::
@ -839,22 +839,22 @@ constant zero.
==== ====
-- --
code:InvocationID:: code:InvocationId::
In a geometry shader, an input variable decorated with the code:InvocationID In a geometry shader, an input variable decorated with the code:InvocationId
decoration contains the index of the current shader invocation, which ranges decoration contains the index of the current shader invocation, which ranges
from zero to the number of <<geometry-invocations,instances>> declared in from zero to the number of <<geometry-invocations,instances>> declared in
the shader minus one. If the instance count of the geometry shader is one or the shader minus one. If the instance count of the geometry shader is one or
is not specified, then code:InvocationID will be zero. is not specified, then code:InvocationId will be zero.
+ +
In tessellation control shaders, and input variable decorated with the In tessellation control shaders, and input variable decorated with the
code:InvocationID decoration contains the index of the output patch vertex code:InvocationId decoration contains the index of the output patch vertex
assigned to the tessellation control shader invocation. assigned to the tessellation control shader invocation.
+ +
The code:InvocationID decoration mustnot: be used in vertex, tessellation The code:InvocationId decoration mustnot: be used in vertex, tessellation
evaluation, fragment, or compute shaders. evaluation, fragment, or compute shaders.
+ +
code:InvocationID must: be declared as a scalar 32-bit integer. code:InvocationId must: be declared as a scalar 32-bit integer.
code:InstanceIndex:: code:InstanceIndex::
@ -889,42 +889,42 @@ shaders.
+ +
code:Layer must: be declared as a scalar 32-bit integer. code:Layer must: be declared as a scalar 32-bit integer.
code:LocalInvocationID:: code:LocalInvocationId::
The code:LocalInvocationID decoration can: be applied to a code:uvec3 input The code:LocalInvocationId decoration can: be applied to a code:uvec3 input
variable in a compute shader, in which case it will contain the location of the variable in a compute shader, in which case it will contain the location of the
current compute shader invocation within the local workgroup. The possible current compute shader invocation within the local workgroup. The possible
values for each component of code:LocalInvocationID range from zero through to values for each component of code:LocalInvocationId range from zero through to
the size of the workgroup in that dimension minus one. the size of the workgroup in that dimension minus one.
+ +
The code:LocalInvocationID decoration must: be used only within compute The code:LocalInvocationId decoration must: be used only within compute
shaders. shaders.
+ +
code:LocalInvocationID must: be declared as a three-component vector of 32-bit code:LocalInvocationId must: be declared as a three-component vector of 32-bit
integers. integers.
[NOTE] [NOTE]
.Note .Note
==== ====
If the size of the workgroup in a particular dimension is one, then the If the size of the workgroup in a particular dimension is one, then the
code:LocalInvocationID in that dimension will be zero. If the workgroup is code:LocalInvocationId in that dimension will be zero. If the workgroup is
effectively two-dimensional, then code:LocalInvocationID.z will be zero. effectively two-dimensional, then code:LocalInvocationId.z will be zero.
If the workgroup is effectively one-dimensional, then both If the workgroup is effectively one-dimensional, then both
code:LocalInvocationID.y and code:LocalInvocationID.z will be zero. code:LocalInvocationId.y and code:LocalInvocationId.z will be zero.
==== ====
code:NumWorkGroups:: code:NumWorkgroups::
The code:NumWorkGroups decoration can: be applied to a code:uvec3 input The code:NumWorkgroups decoration can: be applied to a code:uvec3 input
variable in a compute shader, in which case it will contain the number of variable in a compute shader, in which case it will contain the number of
local workgroups that are part of the dispatch that the invocation belongs local workgroups that are part of the dispatch that the invocation belongs
to. It reflects the values passed to a call to flink:vkCmdDispatch or to. It reflects the values passed to a call to flink:vkCmdDispatch or
through the structure consumed by the execution of through the structure consumed by the execution of
flink:vkCmdDispatchIndirect. flink:vkCmdDispatchIndirect.
+ +
The code:NumWorkGroups decoration must: be used only within compute shaders. The code:NumWorkgroups decoration must: be used only within compute shaders.
+ +
code:NumWorkGroups must: be declared as a three-component vector of 32-bit code:NumWorkgroups must: be declared as a three-component vector of 32-bit
integers. integers.
code:WorkgroupSize:: code:WorkgroupSize::
@ -1013,48 +1013,48 @@ shaders and mustnot: be used in fragment or compute shaders.
code:Position must: be declared as a four-component vector of 32-bit code:Position must: be declared as a four-component vector of 32-bit
floating-point values. floating-point values.
code:PrimitiveID:: code:PrimitiveId::
When the code:PrimitiveID decoration is applied to an input variable in the When the code:PrimitiveId decoration is applied to an input variable in the
tessellation control or tessellation evaluation shader, it will be filled tessellation control or tessellation evaluation shader, it will be filled
with the index of the patch within the current set of rendering primitives with the index of the patch within the current set of rendering primitives
that corresponds to the shader invocation. that corresponds to the shader invocation.
+ +
When the code:PrimitiveID decoration is applied to an input variable in the When the code:PrimitiveId decoration is applied to an input variable in the
geometry shader, it will be filled with the number of primitives presented geometry shader, it will be filled with the number of primitives presented
as input to the geometry shader since the current set of rendering as input to the geometry shader since the current set of rendering
primitives was started. When code:PrimitiveID is applied to an output in the primitives was started. When code:PrimitiveId is applied to an output in the
geometry shader, the resulting value is seen as an input to the fragment geometry shader, the resulting value is seen as an input to the fragment
shader. shader.
+ +
When code:PrimitiveID is applied to an input in the fragment shader, it will When code:PrimitiveId is applied to an input in the fragment shader, it will
be filled with the primitive index written by the geometry shader if a be filled with the primitive index written by the geometry shader if a
geometry shader is present, or with the value that would have been presented geometry shader is present, or with the value that would have been presented
as input to the geometry shader had it been present. If a geometry shader is as input to the geometry shader had it been present. If a geometry shader is
present and the fragment shader reads from an input variable decorated with present and the fragment shader reads from an input variable decorated with
code:PrimitiveID, then the geometry shader must: write to an output variable code:PrimitiveId, then the geometry shader must: write to an output variable
decorated with code:PrimitiveID in all execution paths; otherwise the decorated with code:PrimitiveId in all execution paths; otherwise the
code:PrimitiveID input in the fragment shader is undefined. code:PrimitiveId input in the fragment shader is undefined.
+ +
The code:PrimitiveID decoration mustnot: be used in vertex or compute The code:PrimitiveId decoration mustnot: be used in vertex or compute
shaders. code:PrimitiveID mustnot: be used on output variables in shaders. code:PrimitiveId mustnot: be used on output variables in
tessellation control, tessellation evaluation, or fragment shaders. tessellation control, tessellation evaluation, or fragment shaders.
+ +
code:PrimitiveID must: be declared as scalar 32-bit integer. code:PrimitiveId must: be declared as scalar 32-bit integer.
code:SampleID:: code:SampleId::
The code:SampleID decoration can: be applied to an integer input variable in The code:SampleId decoration can: be applied to an integer input variable in
the fragment shader. This variable will contain the zero-based index of the the fragment shader. This variable will contain the zero-based index of the
sample the invocation corresponds to. code:SampleID ranges from sample the invocation corresponds to. code:SampleId ranges from
zero to the number of samples in the framebuffer minus one. If a fragment zero to the number of samples in the framebuffer minus one. If a fragment
shader entry point's interface includes an input variable decorated with shader entry point's interface includes an input variable decorated with
code:SampleID, per-sample shading is enabled for draws that use that code:SampleId, per-sample shading is enabled for draws that use that
fragment shader. fragment shader.
+ +
code:SampleID is not available in shader stages other than fragment. code:SampleId is not available in shader stages other than fragment.
+ +
code:SampleID must: be declared as a scalar 32-bit integer. code:SampleId must: be declared as a scalar 32-bit integer.
code:SampleMask:: code:SampleMask::
@ -1109,24 +1109,24 @@ The code:SamplePosition decoration must: be used only within fragment shaders.
code:SamplePosition must: be declared as a two-component vector of code:SamplePosition must: be declared as a two-component vector of
floating-point values. floating-point values.
code:TessellationCoord:: code:TessCoord::
The code:TessellationCoord is applied to an input variable in tessellation The code:TessCoord is applied to an input variable in tessellation
evaluation shaders and specifies the three-dimensional (u,v,w) barycentric evaluation shaders and specifies the three-dimensional (u,v,w) barycentric
coordinate of the tessellated vertex within the patch. u, v, coordinate of the tessellated vertex within the patch. u, v,
and w are in the range latexmath:[$[0,1\]$] and vary linearly across the and w are in the range latexmath:[$[0,1\]$] and vary linearly across the
primitive being subdivided. For the tessellation modes of code:Quads or primitive being subdivided. For the tessellation modes of code:Quads or
code:IsoLines, the third component is always zero. code:IsoLines, the third component is always zero.
+ +
The code:TessellationCoord decoration must: be used only within tessellation The code:TessCoord decoration must: be used only within tessellation
evaluation shaders. evaluation shaders.
+ +
code:TessellationCoord must: be declared as three-component vector of 32-bit code:TessCoord must: be declared as three-component vector of 32-bit
floating-point values. floating-point values.
code:TessellationLevelOuter:: code:TessLevelOuter::
The code:TessellationLevelOuter decoration is used in tessellation control The code:TessLevelOuter decoration is used in tessellation control
shaders to decorate an output variable to contain the outer tessellation shaders to decorate an output variable to contain the outer tessellation
factor for the resulting patch. This value is used by the tessellator factor for the resulting patch. This value is used by the tessellator
to control primitive tessellation and can: be read by to control primitive tessellation and can: be read by
@ -1134,15 +1134,15 @@ tessellation evaluation shaders. When applied to an input variable in a
tessellation evaluation shader, the shader can: read the value written by tessellation evaluation shader, the shader can: read the value written by
the tessellation control shader. the tessellation control shader.
+ +
The code:TessellationLevelOuter decoration must: be used only within The code:TessLevelOuter decoration must: be used only within
tessellation control and evaluation shaders. tessellation control and evaluation shaders.
+ +
code:TessellationLevelOuter must: be declared as an array of size two, code:TessLevelOuter must: be declared as an array of size two,
containing 32-bit floating-point values. containing 32-bit floating-point values.
code:TessellationLevelInner:: code:TessLevelInner::
The code:TessellationLevelInner decoration is used in tessellation control The code:TessLevelInner decoration is used in tessellation control
shaders to decorate an output variable to contain the inner tessellation shaders to decorate an output variable to contain the inner tessellation
factor for the resulting patch. This value is used by the tessellator to factor for the resulting patch. This value is used by the tessellator to
control primitive tessellation and can: be read by control primitive tessellation and can: be read by
@ -1150,10 +1150,10 @@ tessellation evaluation shaders. When applied to an input variable in a
tessellation evaluation shader, the shader can: read the value written by tessellation evaluation shader, the shader can: read the value written by
the tessellation control shader. the tessellation control shader.
+ +
The code:TessellationLevelInner decoration must: be used only within The code:TessLevelInner decoration must: be used only within
tessellation control and evaluation shaders. tessellation control and evaluation shaders.
+ +
code:TessellationLevelInner must: be declared as an array of size four, code:TessLevelInner must: be declared as an array of size four,
containing 32-bit floating-point values. containing 32-bit floating-point values.
code:VertexIndex:: code:VertexIndex::
@ -1195,16 +1195,16 @@ fragment shaders.
+ +
code:ViewportIndex must: be declared as a 32-bit integer. code:ViewportIndex must: be declared as a 32-bit integer.
code:WorkgroupID:: code:WorkgroupId::
The code:WorkgroupID built-in decoration can: be applied to an input The code:WorkgroupId built-in decoration can: be applied to an input
variable in the compute shader. It will contain a three dimensional integer variable in the compute shader. It will contain a three dimensional integer
index of the global workgroup that the current invocation is a member of. index of the global workgroup that the current invocation is a member of.
Each component ranges from zero to the values of the parameters passed into Each component ranges from zero to the values of the parameters passed into
flink:vkCmdDispatch or read from the sname:VkDispatchIndirectCommand flink:vkCmdDispatch or read from the sname:VkDispatchIndirectCommand
structure read through a call to flink:vkCmdDispatchIndirect. structure read through a call to flink:vkCmdDispatchIndirect.
+ +
The code:WorkGroupID decoration must: be used only within compute shaders. The code:WorkgroupId decoration must: be used only within compute shaders.
+ +
code:WorkGroupID must: be declared as a three-component vector of 32-bit code:WorkgroupId must: be declared as a three-component vector of 32-bit
integers. integers.

View File

@ -478,10 +478,12 @@ undefined after the query has finished. At least one statistic counter
relevant to the operations supported on the recording command buffer relevant to the operations supported on the recording command buffer
must: be enabled. must: be enabled.
pname:pipelineStatisticsQuery is a bitmask indicating different The pipeline statistic counters are individually enabled for query pools with
possible pipeline statistics. sname:VkQueryPoolCreateInfo::pname:pipelineStatistics, and for secondary command
buffers with sname:VkCommandBufferInheritanceInfo::pname:pipelineStatistics.
Valid bits in pname:pipelineStatistics include:
Valid bits in pname:flags include:
include::../enums/VkQueryPipelineStatisticFlagBits.txt[] include::../enums/VkQueryPipelineStatisticFlagBits.txt[]

View File

@ -21,12 +21,12 @@ endif::doctype-manpage[]
* Any given element of pname:pCommandBuffers must: be in the executable state * Any given element of pname:pCommandBuffers must: be in the executable state
* If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS * If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
* If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT * If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
* If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the pname:subpass member of the pname:inheritanceInfo structure set to the index of the subpass which the given command buffer will be executed in * If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:subpass set to the index of the subpass which the given command buffer will be executed in
* If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see <<renderpass-compatibility>> * If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see <<renderpass-compatibility>>
* If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with the pname:framebuffer member of the sname:VkCommandBufferInheritanceInfo structure not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance * If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with sname:VkCommandBufferInheritanceInfo::pname:framebuffer not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance
* If the <<features-features-inheritedQueries,inherited queries>> feature is not enabled, pname:commandBuffer mustnot: have any queries <<queries-operation-active,active>> * If the <<features-features-inheritedQueries,inherited queries>> feature is not enabled, pname:commandBuffer mustnot: have any queries <<queries-operation-active,active>>
* If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:occlusionQueryEnable set to ename:VK_TRUE * If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:occlusionQueryEnable set to ename:VK_TRUE
* If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:queryFlags having all bits set that are set for the query * If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:queryFlags having all bits set that are set for the query
* If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses * If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query <<queries-operation-active,active>>, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses
* Any given element of pname:pCommandBuffers mustnot: begin any query types that are <<queries-operation-active,active>> in pname:commandBuffer * Any given element of pname:pCommandBuffers mustnot: begin any query types that are <<queries-operation-active,active>> in pname:commandBuffer
ifndef::doctype-manpage[] ifndef::doctype-manpage[]

View File

@ -11,6 +11,7 @@ endif::doctype-manpage[]
* pname:pNext must: be `NULL` * pname:pNext must: be `NULL`
* pname:commandPool must: be a valid sname:VkCommandPool handle * pname:commandPool must: be a valid sname:VkCommandPool handle
* pname:level must: be a valid elink:VkCommandBufferLevel value * pname:level must: be a valid elink:VkCommandBufferLevel value
* pname:commandBufferCount must: be greater than `0`
ifndef::doctype-manpage[] ifndef::doctype-manpage[]
******************************************************************************** ********************************************************************************
endif::doctype-manpage[] endif::doctype-manpage[]

View File

@ -1358,7 +1358,7 @@ class ValidityOutputGenerator(OutputGenerator):
# #
# Get the parent of a handle object # Get the parent of a handle object
def getHandleParent(self, typename): def getHandleParent(self, typename):
types = self.registry.findall("types/type") types = self.registry.tree.findall("types/type")
for elem in types: for elem in types:
if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename: if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename:
return elem.attrib.get('parent') return elem.attrib.get('parent')
@ -1366,7 +1366,7 @@ class ValidityOutputGenerator(OutputGenerator):
# #
# Check if a parent object is dispatchable or not # Check if a parent object is dispatchable or not
def isHandleTypeDispatchable(self, handlename): def isHandleTypeDispatchable(self, handlename):
handle = self.registry.find("types/type/[name='" + handlename + "'][@category='handle']") handle = self.registry.tree.find("types/type/[name='" + handlename + "'][@category='handle']")
if handle is not None and handle.find('type').text == 'VK_DEFINE_HANDLE': if handle is not None and handle.find('type').text == 'VK_DEFINE_HANDLE':
return True return True
else: else:
@ -1399,7 +1399,7 @@ class ValidityOutputGenerator(OutputGenerator):
# #
# Get the category of a type # Get the category of a type
def getTypeCategory(self, typename): def getTypeCategory(self, typename):
types = self.registry.findall("types/type") types = self.registry.tree.findall("types/type")
for elem in types: for elem in types:
if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename: if (elem.find("name") is not None and elem.find('name').text == typename) or elem.attrib.get('name') == typename:
return elem.attrib.get('category') return elem.attrib.get('category')
@ -1607,7 +1607,7 @@ class ValidityOutputGenerator(OutputGenerator):
# Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance) # Try to do check if a structure is always considered valid (i.e. there's no rules to its acceptance)
def isStructAlwaysValid(self, structname): def isStructAlwaysValid(self, structname):
struct = self.registry.find("types/type[@name='" + structname + "']") struct = self.registry.tree.find("types/type[@name='" + structname + "']")
params = struct.findall('member') params = struct.findall('member')
validity = struct.find('validity') validity = struct.find('validity')
@ -1651,7 +1651,7 @@ class ValidityOutputGenerator(OutputGenerator):
asciidoc += self.makeAsciiDocLineForParameter(param, params, '') asciidoc += self.makeAsciiDocLineForParameter(param, params, '')
elif typecategory == 'bitmask': elif typecategory == 'bitmask':
bitsname = paramtype.text.replace('Flags', 'FlagBits') bitsname = paramtype.text.replace('Flags', 'FlagBits')
if self.registry.find("enums[@name='" + bitsname + "']") is None: if self.registry.tree.find("enums[@name='" + bitsname + "']") is None:
asciidoc += '* ' asciidoc += '* '
asciidoc += self.makeParameterName(paramname.text) asciidoc += self.makeParameterName(paramname.text)
asciidoc += ' must: be `0`' asciidoc += ' must: be `0`'
@ -1747,12 +1747,26 @@ class ValidityOutputGenerator(OutputGenerator):
validextensionstructs = param.attrib.get('validextensionstructs') validextensionstructs = param.attrib.get('validextensionstructs')
asciidoc += ' must: be `NULL`' asciidoc += ' must: be `NULL`'
if validextensionstructs is not None: if validextensionstructs is not None:
extensionstructs = ['slink:' + x for x in validextensionstructs.split(',')] extensionstructs = []
asciidoc += ', or a pointer to a valid instance of ' # Check each structure name and skip it if not required by the
if len(extensionstructs) == 1: # generator. This allows tagging extension structs in the XML
asciidoc += validextensionstructs # that are only included in validity when needed for the spec
else: # being targeted.
asciidoc += (', ').join(extensionstructs[:-1]) + ' or ' + extensionstructs[-1] for struct in validextensionstructs.split(','):
# Unpleasantly breaks encapsulation. Should be a method in the registry class
type = self.registry.lookupElementInfo(struct, self.registry.typedict)
if (type == None):
self.logMsg('warn', 'makeStructureExtensionPointer: struct', struct, 'is in a validextensionstructs= attribute but is not in the registry')
elif (type.required):
extensionstructs.append('slink:' + struct)
else:
self.logMsg('diag', 'makeStructureExtensionPointer: struct', struct, 'IS NOT required')
if len(extensionstructs) > 0:
asciidoc += ', or a pointer to a valid instance of '
if len(extensionstructs) == 1:
asciidoc += extensionstructs[0]
else:
asciidoc += (', ').join(extensionstructs[:-1]) + ' or ' + extensionstructs[-1]
asciidoc += '\n' asciidoc += '\n'

View File

@ -217,7 +217,7 @@ class Registry:
def setGenerator(self, gen): def setGenerator(self, gen):
"""Specify output generator object. None restores the default generator""" """Specify output generator object. None restores the default generator"""
self.gen = gen self.gen = gen
self.gen.setRegistry(self.tree) self.gen.setRegistry(self)
# addElementInfo - add information about an element to the # addElementInfo - add information about an element to the
# corresponding dictionary # corresponding dictionary

View File

@ -101,7 +101,7 @@ maintained in the master branch of the Khronos Vulkan Github project.
<type category="define">// Vulkan 1.0 version number <type category="define">// Vulkan 1.0 version number
#define <name>VK_API_VERSION_1_0</name> <type>VK_MAKE_VERSION</type>(1, 0, 0)</type> <!-- The patch version here should never be set to anything other than 0 --> #define <name>VK_API_VERSION_1_0</name> <type>VK_MAKE_VERSION</type>(1, 0, 0)</type> <!-- The patch version here should never be set to anything other than 0 -->
<type category="define">// Version of this file <type category="define">// Version of this file
#define <name>VK_HEADER_VERSION</name> 13</type> #define <name>VK_HEADER_VERSION</name> 14</type>
<type category="define"> <type category="define">
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type> #define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
@ -1106,7 +1106,7 @@ maintained in the master branch of the Khronos Vulkan Github project.
<type category="struct" name="VkDescriptorSetAllocateInfo"> <type category="struct" name="VkDescriptorSetAllocateInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO --> <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member><type>VkDescriptorPool</type> <name>descriptorPool</name></member> <member><type>VkDescriptorPool</type> <name>descriptorPool</name></member>
<member><type>uint32_t</type> <name>descriptorSetCount</name></member> <member><type>uint32_t</type> <name>descriptorSetCount</name></member>
<member len="descriptorSetCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member> <member len="descriptorSetCount">const <type>VkDescriptorSetLayout</type>* <name>pSetLayouts</name></member>
<validity> <validity>
@ -1486,7 +1486,7 @@ maintained in the master branch of the Khronos Vulkan Github project.
<type category="struct" name="VkCommandPoolCreateInfo"> <type category="struct" name="VkCommandPoolCreateInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO --> <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member optional="true"><type>VkCommandPoolCreateFlags</type> <name>flags</name></member> <!-- Command pool creation flags --> <member optional="true"><type>VkCommandPoolCreateFlags</type> <name>flags</name></member> <!-- Command pool creation flags -->
<member><type>uint32_t</type> <name>queueFamilyIndex</name></member> <member><type>uint32_t</type> <name>queueFamilyIndex</name></member>
<validity> <validity>
<usage>pname:queueFamilyIndex must: be the index of a queue family available in the calling command's pname:device parameter</usage> <usage>pname:queueFamilyIndex must: be the index of a queue family available in the calling command's pname:device parameter</usage>
@ -1495,9 +1495,12 @@ maintained in the master branch of the Khronos Vulkan Github project.
<type category="struct" name="VkCommandBufferAllocateInfo"> <type category="struct" name="VkCommandBufferAllocateInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO --> <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO -->
<member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure --> <member>const <type>void</type>* <name>pNext</name></member> <!-- Pointer to next structure -->
<member><type>VkCommandPool</type> <name>commandPool</name></member> <member><type>VkCommandPool</type> <name>commandPool</name></member>
<member><type>VkCommandBufferLevel</type> <name>level</name></member> <member><type>VkCommandBufferLevel</type> <name>level</name></member>
<member><type>uint32_t</type> <name>commandBufferCount</name></member> <member><type>uint32_t</type> <name>commandBufferCount</name></member>
<validity>
<usage>pname:commandBufferCount must: be greater than `0`</usage>
</validity>
</type> </type>
<type category="struct" name="VkCommandBufferInheritanceInfo"> <type category="struct" name="VkCommandBufferInheritanceInfo">
<member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO --> <member><type>VkStructureType</type> <name>sType</name></member> <!-- Must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO -->
@ -4486,12 +4489,12 @@ maintained in the master branch of the Khronos Vulkan Github project.
<usage>Any given element of pname:pCommandBuffers must: be in the executable state</usage> <usage>Any given element of pname:pCommandBuffers must: be in the executable state</usage>
<usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS</usage> <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, that render pass instance must: have been begun with the pname:contents parameter of fname:vkCmdBeginRenderPass set to ename:VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS</usage>
<usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT</usage> <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the ename:VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT</usage>
<usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with the pname:subpass member of the pname:inheritanceInfo structure set to the index of the subpass which the given command buffer will be executed in</usage> <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:subpass set to the index of the subpass which the given command buffer will be executed in</usage>
<usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see &lt;&lt;renderpass-compatibility&gt;&gt;</usage> <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, any given element of pname:pCommandBuffers must: have been recorded with a render pass that is compatible with the current render pass - see &lt;&lt;renderpass-compatibility&gt;&gt;</usage>
<usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with the pname:framebuffer member of the sname:VkCommandBufferInheritanceInfo structure not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance</usage> <usage>If fname:vkCmdExecuteCommands is being called within a render pass instance, and any given element of pname:pCommandBuffers was recorded with sname:VkCommandBufferInheritanceInfo::pname:framebuffer not equal to sname:VK_NULL_HANDLE, that sname:VkFramebuffer must: be compatible with the sname:VkFramebuffer used in the current render pass instance</usage>
<usage>If the &lt;&lt;features-features-inheritedQueries,inherited queries&gt;&gt; feature is not enabled, pname:commandBuffer mustnot: have any queries &lt;&lt;queries-operation-active,active&gt;&gt;</usage> <usage>If the &lt;&lt;features-features-inheritedQueries,inherited queries&gt;&gt; feature is not enabled, pname:commandBuffer mustnot: have any queries &lt;&lt;queries-operation-active,active&gt;&gt;</usage>
<usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query &lt;&lt;queries-operation-active,active&gt;&gt;, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:occlusionQueryEnable set to ename:VK_TRUE</usage> <usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query &lt;&lt;queries-operation-active,active&gt;&gt;, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:occlusionQueryEnable set to ename:VK_TRUE</usage>
<usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query &lt;&lt;queries-operation-active,active&gt;&gt;, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferBeginInfo::pname:queryFlags having all bits set that are set for the query</usage> <usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_OCCLUSION query &lt;&lt;queries-operation-active,active&gt;&gt;, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:queryFlags having all bits set that are set for the query</usage>
<usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query &lt;&lt;queries-operation-active,active&gt;&gt;, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses</usage> <usage>If pname:commandBuffer has a ename:VK_QUERY_TYPE_PIPELINE_STATISTICS query &lt;&lt;queries-operation-active,active&gt;&gt;, then each element of pname:pCommandBuffers must: have been recorded with sname:VkCommandBufferInheritanceInfo::pname:pipelineStatistics having all bits set that are set in the sname:VkQueryPool the query uses</usage>
<usage>Any given element of pname:pCommandBuffers mustnot: begin any query types that are &lt;&lt;queries-operation-active,active&gt;&gt; in pname:commandBuffer</usage> <usage>Any given element of pname:pCommandBuffers mustnot: begin any query types that are &lt;&lt;queries-operation-active,active&gt;&gt; in pname:commandBuffer</usage>
</validity> </validity>

View File

@ -43,7 +43,7 @@ extern "C" {
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
// Version of this file // Version of this file
#define VK_HEADER_VERSION 13 #define VK_HEADER_VERSION 14
#define VK_NULL_HANDLE 0 #define VK_NULL_HANDLE 0