summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/specs/vulkan/Makefile4
-rw-r--r--doc/specs/vulkan/appendices/VK_AMD_gpu_shader_int16.txt2
-rw-r--r--doc/specs/vulkan/appendices/VK_AMD_shader_image_load_store_lod.txt2
-rw-r--r--doc/specs/vulkan/appendices/VK_AMD_texture_gather_bias_lod.txt2
-rw-r--r--doc/specs/vulkan/appendices/VK_EXT_shader_stencil_export.txt2
-rw-r--r--doc/specs/vulkan/appendices/VK_KHR_maintenance2.txt4
-rw-r--r--doc/specs/vulkan/appendices/VK_NN_vi_surface.txt2
-rw-r--r--doc/specs/vulkan/chapters/VK_KHR_surface/wsi.txt2
-rw-r--r--doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt112
-rw-r--r--doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt43
-rw-r--r--doc/specs/vulkan/chapters/clears.txt52
-rw-r--r--doc/specs/vulkan/chapters/cmdbuffers.txt2
-rw-r--r--doc/specs/vulkan/chapters/copies.txt74
-rw-r--r--doc/specs/vulkan/chapters/descriptorsets.txt18
-rw-r--r--doc/specs/vulkan/chapters/fragops.txt2
-rw-r--r--doc/specs/vulkan/chapters/fundamentals.txt32
-rw-r--r--doc/specs/vulkan/chapters/memory.txt251
-rw-r--r--doc/specs/vulkan/chapters/pipelines.txt36
-rw-r--r--doc/specs/vulkan/chapters/renderpass.txt2
-rw-r--r--doc/specs/vulkan/chapters/resources.txt53
-rw-r--r--doc/specs/vulkan/chapters/sparsemem.txt10
-rw-r--r--doc/specs/vulkan/chapters/synchronization.txt29
-rw-r--r--doc/specs/vulkan/chapters/vertexpostproc.txt11
-rw-r--r--src/spec/validitygenerator.py10
24 files changed, 407 insertions, 350 deletions
diff --git a/doc/specs/vulkan/Makefile b/doc/specs/vulkan/Makefile
index 06946f2..3a19d45 100644
--- a/doc/specs/vulkan/Makefile
+++ b/doc/specs/vulkan/Makefile
@@ -93,8 +93,8 @@ VERBOSE =
# ADOCOPTS options for asciidoc->HTML5 output
NOTEOPTS = -a editing-notes -a implementation-guide
SPECREVISION = 1.0.64
-# Spell out RFC2822 format as not all date commands support -R
-SPECDATE = $(shell echo `date -u "+%a, %d %b %Y %T %z"`)
+# Spell out ISO 8601 format as not all date commands support --rfc-3339
+SPECDATE = $(shell echo `date -u "+%Y-%m-%d %TZ"`)
# Generate Asciidoc attributes for spec remark
# Could use `git log -1 --format="%cd"` to get branch commit date
diff --git a/doc/specs/vulkan/appendices/VK_AMD_gpu_shader_int16.txt b/doc/specs/vulkan/appendices/VK_AMD_gpu_shader_int16.txt
index c78d237..218c558 100644
--- a/doc/specs/vulkan/appendices/VK_AMD_gpu_shader_int16.txt
+++ b/doc/specs/vulkan/appendices/VK_AMD_gpu_shader_int16.txt
@@ -1,7 +1,7 @@
include::meta/VK_AMD_gpu_shader_int16.txt[]
*Last Modified Date*::
- 06/08/2017
+ 2017-06-08
*IP Status*::
No known IP claims.
*Interactions and External Dependencies*::
diff --git a/doc/specs/vulkan/appendices/VK_AMD_shader_image_load_store_lod.txt b/doc/specs/vulkan/appendices/VK_AMD_shader_image_load_store_lod.txt
index 77f7d35..b672eec 100644
--- a/doc/specs/vulkan/appendices/VK_AMD_shader_image_load_store_lod.txt
+++ b/doc/specs/vulkan/appendices/VK_AMD_shader_image_load_store_lod.txt
@@ -1,7 +1,7 @@
include::meta/VK_AMD_shader_image_load_store_lod.txt[]
*Last Modified Date*::
- 08/21/2017
+ 2017-08-21
*Interactions and External Dependencies*::
- This extension requires the
https://www.khronos.org/registry/spir-v/extensions/AMD/SPV_AMD_shader_image_load_store_lod.html[+SPV_AMD_shader_image_load_store_lod+]
diff --git a/doc/specs/vulkan/appendices/VK_AMD_texture_gather_bias_lod.txt b/doc/specs/vulkan/appendices/VK_AMD_texture_gather_bias_lod.txt
index f2d9fb6..f6ef20b 100644
--- a/doc/specs/vulkan/appendices/VK_AMD_texture_gather_bias_lod.txt
+++ b/doc/specs/vulkan/appendices/VK_AMD_texture_gather_bias_lod.txt
@@ -1,7 +1,7 @@
include::meta/VK_AMD_texture_gather_bias_lod.txt[]
*Last Modified Date*::
- 03/21/2017
+ 2017-03-21
*IP Status*::
No known IP claims.
*Interactions and External Dependencies*::
diff --git a/doc/specs/vulkan/appendices/VK_EXT_shader_stencil_export.txt b/doc/specs/vulkan/appendices/VK_EXT_shader_stencil_export.txt
index 7df0dbe..e181e13 100644
--- a/doc/specs/vulkan/appendices/VK_EXT_shader_stencil_export.txt
+++ b/doc/specs/vulkan/appendices/VK_EXT_shader_stencil_export.txt
@@ -1,7 +1,7 @@
include::meta/VK_EXT_shader_stencil_export.txt[]
*Last Modified Date*::
- 07/19/2017
+ 2017-07-19
*IP Status*::
No known IP claims.
*Interactions and External Dependencies*::
diff --git a/doc/specs/vulkan/appendices/VK_KHR_maintenance2.txt b/doc/specs/vulkan/appendices/VK_KHR_maintenance2.txt
index 6ef559c..c7881a1 100644
--- a/doc/specs/vulkan/appendices/VK_KHR_maintenance2.txt
+++ b/doc/specs/vulkan/appendices/VK_KHR_maintenance2.txt
@@ -5,7 +5,7 @@
include::meta/VK_KHR_maintenance2.txt[]
*Last Modified Date*::
- Tue 28 Apr 2017
+ 2017-04-28
*Contributors*::
- Michael Worcester, Imagination Technologies
- Stuart Smith, Imagination Technologies
@@ -136,4 +136,4 @@ unextended Vulkan to have a default of an upper-left origin.
=== Version History
- * Revision 1, Tue 28 Apr 2017
+ * Revision 1, 2017-04-28
diff --git a/doc/specs/vulkan/appendices/VK_NN_vi_surface.txt b/doc/specs/vulkan/appendices/VK_NN_vi_surface.txt
index 9f519ba..217c194 100644
--- a/doc/specs/vulkan/appendices/VK_NN_vi_surface.txt
+++ b/doc/specs/vulkan/appendices/VK_NN_vi_surface.txt
@@ -1,7 +1,7 @@
include::meta/VK_NN_vi_surface.txt[]
*Last Modified Date*::
- 2016-12-2
+ 2016-12-02
*IP Status*::
No known IP claims.
*Contributors*::
diff --git a/doc/specs/vulkan/chapters/VK_KHR_surface/wsi.txt b/doc/specs/vulkan/chapters/VK_KHR_surface/wsi.txt
index c48ba55..fc3bdcf 100644
--- a/doc/specs/vulkan/chapters/VK_KHR_surface/wsi.txt
+++ b/doc/specs/vulkan/chapters/VK_KHR_surface/wsi.txt
@@ -894,7 +894,7 @@ In this case, the application can: use any valid elink:VkFormat value.
====
In the initial release of the +VK_KHR_surface+ and +VK_KHR_swapchain+
extensions, the token ename:VK_COLORSPACE_SRGB_NONLINEAR_KHR was used.
-Starting in the May 13, 2016 updates to the extension branches, matching
+Starting in the 2016-05-13 updates to the extension branches, matching
release 1.0.13 of the core API specification,
ename:VK_COLOR_SPACE_SRGB_NONLINEAR_KHR is used instead for consistency with
Vulkan naming rules.
diff --git a/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt b/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt
index b61c440..d101a15 100644
--- a/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt
+++ b/doc/specs/vulkan/chapters/VK_KHR_swapchain/wsi.txt
@@ -110,106 +110,110 @@ include::../../api/structs/VkSwapchainCreateInfoKHR.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:flags is a bitmask of elink:VkSwapchainCreateFlagBitsKHR
- indicating parameters of swapchain creation.
- * pname:surface is the surface to which the swapchain will present images.
- The swapchain is associated with pname:surface.
+ indicating parameters of the swapchain creation.
+ * pname:surface is the surface onto which the swapchain will present
+ images.
+ If the creation succeeds, the swapchain becomes associated with
+ pname:surface.
* pname:minImageCount is the minimum number of presentable images that the
application needs.
- The platform will either create the swapchain with at least that many
- images, or will fail to create the swapchain.
- * pname:imageFormat is a slink:VkFormat that is valid for swapchains on
- the specified surface.
- * pname:imageColorSpace is a slink:VkColorSpaceKHR that is valid for
- swapchains on the specified surface.
- * pname:imageExtent is the non-zero size (in pixels) of the swapchain.
- Behavior is platform-dependent when the image extent does not match the
- surface's pname:currentExtent as returned by
+ The implementation will either create the swapchain with at least that
+ many images, or it will fail to create the swapchain.
+ * pname:imageFormat is a elink:VkFormat value specifying the format
+ the swapchain image(s) will be created with.
+ * pname:imageColorSpace is a slink:VkColorSpaceKHR value specifying the
+ way the swapchain interprets image data.
+ * pname:imageExtent is the size (in pixels) of the swapchain image(s).
+ The behavior is platform-dependent if the image extent does not match
+ the surface's pname:currentExtent as returned by
fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR.
[NOTE]
.Note
====
-On some platforms, flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR can
-return in slink:VkSurfaceCapabilitiesKHR a pname:currentExtent that has a
-pname:width and/or pname:height equal to zero.
-This can happen, e.g., while a native window object is minimized.
-In this situation, the native window object may have to be restored from the
-minimized state before a sname:VkSwapchainKHR can be created, because:
-
- * The pname:minImageExtent and pname:maxImageExtent values returned by
- flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR may match the
- pname:currentExtent.
- * On some platforms, the pname:imageExtent member of
- sname:VkSwapchainCreateInfoKHR must match the pname:currentExtent
- returned by flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR.
+During some situations, sname:VkSwapchainKHR cannot: be created because of
+the Valid Usage of the pname:imageExtent parameter.
+
+The flink:vkGetPhysicalDeviceSurfaceCapabilitiesKHR may: return in
+slink:VkSurfaceCapabilitiesKHR a pname:currentExtent that has the
+pname:width and/or pname:height equal to 0, or that is less than its
+counterpart in pname:minImageExtent.
+Similarly, pname:maxImageExtent may: also have 0 values for pname:width
+and/or pname:height.
+For example, on some platforms that may: happen while an associated window
+is minimized.
====
* pname:imageArrayLayers is the number of views in a multiview/stereo
surface.
For non-stereoscopic-3D applications, this value is 1.
- * pname:imageUsage is a bitmask of elink:VkImageUsageFlagBits, indicating
- how the application will use the swapchain's presentable images.
- * pname:imageSharingMode is the sharing mode used for the images of the
+ * pname:imageUsage is a bitmask of elink:VkImageUsageFlagBits describing
+ the intended usage of the (acquired) swapchain images.
+ * pname:imageSharingMode is the sharing mode used for the image(s) of the
swapchain.
* pname:queueFamilyIndexCount is the number of queue families having
- access to the images of the swapchain in case pname:imageSharingMode is
+ access to the image(s) of the swapchain when pname:imageSharingMode is
ename:VK_SHARING_MODE_CONCURRENT.
* pname:pQueueFamilyIndices is an array of queue family indices having
- access to the images of the swapchain in case pname:imageSharingMode is
+ access to the images(s) of the swapchain when pname:imageSharingMode is
ename:VK_SHARING_MODE_CONCURRENT.
- * pname:preTransform is a bitmask of elink:VkSurfaceTransformFlagBitsKHR,
+ * pname:preTransform is a elink:VkSurfaceTransformFlagBitsKHR value
describing the transform, relative to the presentation engine's natural
orientation, applied to the image content prior to presentation.
If it does not match the pname:currentTransform value returned by
fname:vkGetPhysicalDeviceSurfaceCapabilitiesKHR, the presentation engine
will transform the image content as part of the presentation operation.
- * pname:compositeAlpha is a bitmask of elink:VkCompositeAlphaFlagBitsKHR
+ * pname:compositeAlpha is a elink:VkCompositeAlphaFlagBitsKHR value
indicating the alpha compositing mode to use when this surface is
composited together with other surfaces on certain window systems.
* pname:presentMode is the presentation mode the swapchain will use.
A swapchain's present mode determines how incoming present requests will
be processed and queued internally.
* pname:clipped indicates whether the Vulkan implementation is allowed to
- discard rendering operations that affect regions of the surface which
+ discard rendering operations that affect regions of the surface that
are not visible.
** If set to ename:VK_TRUE, the presentable images associated with the
swapchain may: not own all of their pixels.
Pixels in the presentable images that correspond to regions of the
- target surface obscured by another window on the desktop or subject to
+ target surface obscured by another window on the desktop, or subject to
some other clipping mechanism will have undefined content when read
back.
Pixel shaders may: not execute for these pixels, and thus any side
- affects they would have had will not occur.
- ** If set to ename:VK_FALSE, presentable images associated with the
- swapchain will own all the pixels they contain.
- Setting this value to ename:VK_TRUE does not guarantee any clipping
+ effects they would have had will not occur.
+ ename:VK_TRUE value does not guarantee any clipping
will occur, but allows more optimal presentation methods to be used on
some platforms.
+ ** If set to ename:VK_FALSE, presentable images associated with the
+ swapchain will own all of the pixels they contain.
[NOTE]
.Note
====
Applications should: set this value to ename:VK_TRUE if they do not expect
to read back the content of presentable images before presenting them or
-after reacquiring them and if their pixel shaders do not have any side
+after reacquiring them, and if their pixel shaders do not have any side
effects that require them to run for all pixels in the presentable image.
====
- * pname:oldSwapchain, if not dlink:VK_NULL_HANDLE, specifies an existing
- non-retired swapchain that is associated with surface.
+ * pname:oldSwapchain is dlink:VK_NULL_HANDLE, or the existing non-retired
+ swapchain currently associated with pname:surface.
+ Providing a valid pname:oldSwapchain may: aid in the resource reuse, and
+ also allows the application to still present any images that are already
+ acquired from it.
+
+Upon calling fname:vkCreateSwapchainKHR with a pname:oldSwapchain that
+is not dlink:VK_NULL_HANDLE, pname:oldSwapchain is retired -- even if
+creation of the new swapchain fails.
+The new swapchain is created in the non-retired state whether or not
+pname:oldSwapchain is dlink:VK_NULL_HANDLE.
+
+Upon calling fname:vkCreateSwapchainKHR with a pname:oldSwapchain that
+is not dlink:VK_NULL_HANDLE, any images from pname:oldSwapchain that are
+not acquired by the application may: be freed by the implementation,
+which may: occur even if creation of the new swapchain fails.
+The application can: destroy pname:oldSwapchain to free all memory
+associated with pname:oldSwapchain.
- Upon calling fname:vkCreateSwapchainKHR with a pname:oldSwapchain that
- is not dlink:VK_NULL_HANDLE, pname:oldSwapchain is retired, even if
- creation of the new swapchain fails.
- The new swapchain is created in the non-retired state whether or not
- pname:oldSwapchain is dlink:VK_NULL_HANDLE.
-
- Upon calling fname:vkCreateSwapchainKHR with a pname:oldSwapchain that
- is not dlink:VK_NULL_HANDLE, any images from pname:oldSwapchain that are
- not acquired by the application may: be freed by the implementation,
- which may: occur even if creation of the new swapchain fails.
- The application must: destroy sname:oldSwapchain to free all memory
- associated with sname:oldSwapchain.
[NOTE]
.Note
====
@@ -299,7 +303,7 @@ ifdef::VK_KHR_shared_presentable_image[]
endif::VK_KHR_shared_presentable_image[]
* [[VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01277]]
If pname:imageSharingMode is ename:VK_SHARING_MODE_CONCURRENT,
- pname:pQueueFamilyIndices must: be a pointer to an array of
+ pname:pQueueFamilyIndices must: be a valid pointer to an array of
pname:queueFamilyIndexCount basetype:uint32_t values
* [[VUID-VkSwapchainCreateInfoKHR-imageSharingMode-01278]]
If pname:imageSharingMode is ename:VK_SHARING_MODE_CONCURRENT,
diff --git a/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt b/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt
index c5c09b5..34aa903 100644
--- a/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt
+++ b/doc/specs/vulkan/chapters/VK_NV_clip_space_w_scaling/vertexpostproc.txt
@@ -1,8 +1,8 @@
[[vertexpostproc-viewportwscaling]]
== Controlling Viewport W Scaling
-If viewport W scaling is enabled, the W component of the clip coordinate is
-modified by the provided coefficients from the corresponding viewport as
+If viewport *W* scaling is enabled, the *W* component of the clip coordinate
+is modified by the provided coefficients from the corresponding viewport as
follows.
:: [eq]#w~c~' = x~coeff~ x~c~ {plus} y~coeff~ y~c~ {plus} w~c~#
@@ -15,40 +15,17 @@ as:
include::../../api/structs/VkPipelineViewportWScalingStateCreateInfoNV.txt[]
- * pname:sType is the type of this structure
- * pname:pNext is `NULL` or a pointer to an extension-specific structure
- * pname:viewportWScalingEnable is the enable for viewport W scaling
- * pname:viewportCount is the number of viewports used by W scaling and
- must: match the number of viewports in the pipeline if viewport W
+ * pname:sType is the type of this structure.
+ * pname:pNext is `NULL` or a pointer to an extension-specific structure.
+ * pname:viewportWScalingEnable controls whether viewport *W* scaling is
+ enabled.
+ * pname:viewportCount is the number of viewports used by *W* scaling, and
+ must: match the number of viewports in the pipeline if viewport *W*
scaling is enabled.
* pname:pViewportWScalings is a pointer to an array of
- sname:VkViewportWScalingNV structures which define the W scaling
+ sname:VkViewportWScalingNV structures, which define the *W* scaling
parameters for the corresponding viewport.
- If the viewport W scaling state is dynamic, this member is ignored.
- * If no element of the pname:pDynamicStates member of
- sname::VkPipelineViewportStateCreateInfo::pname:pDynamicState is
- ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, the
- pname:pViewportScalings member of a
- sname:VkPipelineViewportWScalingStateCreateInfoNV extension structure
- must: be a pointer to an array of
- sname:VkPipelineViewportWScalingStateCreateInfoNV::pname:viewportCount
- sname:VkViewportWScalingNV structures
-
-.Valid Usage
-****
- * [[VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportWScalingEnable-01319]]
- If the <<features-features-multiViewport,multiple viewports>> feature is
- not enabled and pname:viewportWScalingEnable is ename:VK_TRUE,
- pname:viewportCount must: be `1`
- * [[VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-01320]]
- pname:viewportCount must: be between `1` and
- sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive if
- pname:viewportWScalingEnable is ename:VK_TRUE
- * [[VUID-VkPipelineViewportWScalingStateCreateInfoNV-viewportCount-01321]]
- pname:viewportCount and
- sname:VkPipelineViewportStateCreateInfo::pname:viewportCount must: be
- identical if pname:viewportWScalingEnable is ename:VK_TRUE
-****
+ If the viewport *W* scaling state is dynamic, this member is ignored.
include::../../validity/structs/VkPipelineViewportWScalingStateCreateInfoNV.txt[]
--
diff --git a/doc/specs/vulkan/chapters/clears.txt b/doc/specs/vulkan/chapters/clears.txt
index c778810..2a47247 100644
--- a/doc/specs/vulkan/chapters/clears.txt
+++ b/doc/specs/vulkan/chapters/clears.txt
@@ -88,27 +88,21 @@ endif::VK_KHR_shared_presentable_image[]
elements of the pname:pRanges array must: each be less than the
pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-vkCmdClearColorImage-levelCount-01471]]
- If the slink:VkImageSubresourceRange::pname:levelCount member of any
- element of the pname:pRanges array is not ename:VK_REMAINING_MIP_LEVELS,
- it must: be non-zero and
- [eq]#slink:VkImageSubresourceRange::pname:baseMipLevel {plus}
- slink:VkImageSubresourceRange::pname:levelCount# for that element of the
- pname:pRanges array must: be less than or equal to the pname:mipLevels
- specified in slink:VkImageCreateInfo when pname:image was created
+ * For each slink:VkImageSubresourceRange element of pname:pRanges, if
+ the pname:levelCount member is not ename:VK_REMAINING_MIP_LEVELS, then
+ [eq]#pname:baseMipLevel {plus} pname:levelCount# must: be less than the
+ pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
+ was created
* [[VUID-vkCmdClearColorImage-baseArrayLayer-01472]]
The slink:VkImageSubresourceRange::pname:baseArrayLayer members of the
elements of the pname:pRanges array must: each be less than the
pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-vkCmdClearColorImage-layerCount-01473]]
- If the slink:VkImageSubresourceRange::pname:layerCount member of any
- element of the pname:pRanges array is not
- ename:VK_REMAINING_ARRAY_LAYERS, it must: be non-zero and
- [eq]#slink:VkImageSubresourceRange::pname:baseArrayLayer {plus}
- slink:VkImageSubresourceRange::pname:layerCount# for that element of the
- pname:pRanges array must: be less than or equal to the pname:arrayLayers
- specified in slink:VkImageCreateInfo when pname:image was created
+ * For each slink:VkImageSubresourceRange element of pname:pRanges, if
+ the pname:layerCount member is not ename:VK_REMAINING_ARRAY_LAYERS, then
+ [eq]#pname:baseArrayLayer {plus} pname:layerCount# must: be less than
+ the pname:arrayLayers specified in slink:VkImageCreateInfo when
+ pname:image was created
* [[VUID-vkCmdClearColorImage-image-00007]]
pname:image must: not have a compressed or depth/stencil format
****
@@ -176,27 +170,21 @@ endif::VK_KHR_maintenance1[]
elements of the pname:pRanges array must: each be less than the
pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-vkCmdClearDepthStencilImage-levelCount-01475]]
- If the slink:VkImageSubresourceRange::pname:levelCount member of any
- element of the pname:pRanges array is not ename:VK_REMAINING_MIP_LEVELS,
- it must: be non-zero and
- [eq]#slink:VkImageSubresourceRange::pname:baseMipLevel {plus}
- slink:VkImageSubresourceRange::pname:levelCount# for that element of the
- pname:pRanges array must: be less than or equal to the pname:mipLevels
- specified in slink:VkImageCreateInfo when pname:image was created
+ * For each slink:VkImageSubresourceRange element of pname:pRanges, if
+ the pname:levelCount member is not ename:VK_REMAINING_MIP_LEVELS, then
+ [eq]#pname:baseMipLevel {plus} pname:levelCount# must: be less than the
+ pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
+ was created
* [[VUID-vkCmdClearDepthStencilImage-baseArrayLayer-01476]]
The slink:VkImageSubresourceRange::pname:baseArrayLayer members of the
elements of the pname:pRanges array must: each be less than the
pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-vkCmdClearDepthStencilImage-layerCount-01477]]
- If the slink:VkImageSubresourceRange::pname:layerCount member of any
- element of the pname:pRanges array is not
- ename:VK_REMAINING_ARRAY_LAYERS, it must: be non-zero and
- [eq]#slink:VkImageSubresourceRange::pname:baseArrayLayer {plus}
- slink:VkImageSubresourceRange::pname:layerCount# for that element of the
- pname:pRanges array must: be less than or equal to the pname:arrayLayers
- specified in slink:VkImageCreateInfo when pname:image was created
+ * For each slink:VkImageSubresourceRange element of pname:pRanges, if
+ the pname:layerCount member is not ename:VK_REMAINING_ARRAY_LAYERS, then
+ [eq]#pname:baseArrayLayer {plus} pname:layerCount# must: be less than
+ the pname:arrayLayers specified in slink:VkImageCreateInfo when
+ pname:image was created
* [[VUID-vkCmdClearDepthStencilImage-image-00014]]
pname:image must: have a depth/stencil format
****
diff --git a/doc/specs/vulkan/chapters/cmdbuffers.txt b/doc/specs/vulkan/chapters/cmdbuffers.txt
index 9bfc398..a6cff27 100644
--- a/doc/specs/vulkan/chapters/cmdbuffers.txt
+++ b/doc/specs/vulkan/chapters/cmdbuffers.txt
@@ -504,7 +504,7 @@ recorded into it, becomes <<commandbuffers-lifecycle, invalid>>.
All elements of pname:pCommandBuffers must: not be in the
<<commandbuffers-lifecycle, pending state>>
* [[VUID-vkFreeCommandBuffers-pCommandBuffers-00048]]
- pname:pCommandBuffers must: be a pointer to an array of
+ pname:pCommandBuffers must: be a valid pointer to an array of
pname:commandBufferCount sname:VkCommandBuffer handles, each element of
which must: either be a valid handle or `NULL`
****
diff --git a/doc/specs/vulkan/chapters/copies.txt b/doc/specs/vulkan/chapters/copies.txt
index 2a69417..de36b05 100644
--- a/doc/specs/vulkan/chapters/copies.txt
+++ b/doc/specs/vulkan/chapters/copies.txt
@@ -436,6 +436,20 @@ ifdef::VK_KHR_sampler_ycbcr_conversion[]
endif::VK_KHR_sampler_ycbcr_conversion[]
* [[VUID-vkCmdCopyImage-srcImage-00136]]
The sample count of pname:srcImage and pname:dstImage must: match
+ * The pname:srcSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The pname:dstSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
+ * The [eq]#pname:srcSubresource.baseArrayLayer {plus}
+ pname:srcSubresource.layerCount# of each element of pname:pRegions must:
+ be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The [eq]#pname:dstSubresource.baseArrayLayer {plus}
+ pname:dstSubresource.layerCount# of each element of pname:pRegions must:
+ be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
****
include::../validity/protos/vkCmdCopyImage.txt[]
@@ -590,11 +604,6 @@ endif::VK_KHR_maintenance1[]
If the calling command's pname:srcImage is of type
ename:VK_IMAGE_TYPE_1D or ename:VK_IMAGE_TYPE_2D, then pname:srcOffset.z
must: be `0` and pname:extent.depth must: be `1`.
- * [[VUID-VkImageCopy-srcSubresource-00149]]
- pname:srcSubresource.baseArrayLayer must: be less than and
- [eq]#(pname:srcSubresource.layerCount {plus}
- pname:srcSubresource.baseArrayLayer)# must: be less than or equal to the
- number of layers in the source image
* [[VUID-VkImageCopy-dstOffset-00150]]
pname:dstOffset.x and [eq]#(pname:extent.width {plus}
pname:dstOffset.x)# must: both be greater than or equal to `0` and less
@@ -615,11 +624,6 @@ endif::VK_KHR_maintenance1[]
If the calling command's pname:dstImage is of type
ename:VK_IMAGE_TYPE_1D or ename:VK_IMAGE_TYPE_2D, then pname:dstOffset.z
must: be `0` and pname:extent.depth must: be `1`.
- * [[VUID-VkImageCopy-dstSubresource-00155]]
- pname:dstSubresource.baseArrayLayer must: be less than and
- [eq]#(pname:dstSubresource.layerCount {plus}
- pname:dstSubresource.baseArrayLayer)# must: be less than or equal to the
- number of layers in the destination image
* [[VUID-VkImageCopy-srcOffset-00157]]
If the calling command's pname:srcImage is a compressed image,
ifdef::VK_KHR_sampler_ycbcr_conversion[]
@@ -714,13 +718,7 @@ include::../api/structs/VkImageSubresourceLayers.txt[]
ename:VK_IMAGE_ASPECT_STENCIL_BIT
* [[VUID-VkImageSubresourceLayers-aspectMask-00168]]
pname:aspectMask must: not contain ename:VK_IMAGE_ASPECT_METADATA_BIT
- * [[VUID-VkImageSubresourceLayers-mipLevel-00169]]
- pname:mipLevel must: be less than the pname:mipLevels specified in
- slink:VkImageCreateInfo when the image was created
- * [[VUID-VkImageSubresourceLayers-baseArrayLayer-00170]]
- [eq]#(pname:baseArrayLayer {plus} pname:layerCount)# must: be less than
- or equal to the pname:arrayLayers specified in slink:VkImageCreateInfo
- when the image was created
+ * pname:layerCount must: be greater than 0
****
include::../validity/structs/VkImageSubresourceLayers.txt[]
@@ -828,6 +826,13 @@ ifdef::VK_KHR_shared_presentable_image[]
ename:VK_IMAGE_LAYOUT_GENERAL, or
ename:VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
endif::VK_KHR_shared_presentable_image[]
+ * The pname:imageSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
+ * The [eq]#pname:imageSubresource.baseArrayLayer {plus}
+ pname:imageSubresource.layerCount# of each element of pname:pRegions
+ must: be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
****
include::../validity/protos/vkCmdCopyBufferToImage.txt[]
@@ -929,6 +934,13 @@ endif::VK_KHR_shared_presentable_image[]
* [[VUID-vkCmdCopyImageToBuffer-dstBuffer-00192]]
If pname:dstBuffer is non-sparse then it must: be bound completely and
contiguously to a single sname:VkDeviceMemory object
+ * The pname:imageSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The [eq]#pname:imageSubresource.baseArrayLayer {plus}
+ pname:imageSubresource.layerCount# of each element of pname:pRegions
+ must: be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
****
include::../validity/protos/vkCmdCopyImageToBuffer.txt[]
@@ -1460,6 +1472,20 @@ ifdef::VK_IMG_filter_cubic[]
If pname:filter is ename:VK_FILTER_CUBIC_IMG, pname:srcImage must: have
a elink:VkImageType of ename:VK_IMAGE_TYPE_3D
endif::VK_IMG_filter_cubic[]
+ * The pname:srcSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The pname:dstSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
+ * The [eq]#pname:srcSubresource.baseArrayLayer {plus}
+ pname:srcSubresource.layerCount# of each element of pname:pRegions must:
+ be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The [eq]#pname:dstSubresource.baseArrayLayer {plus}
+ pname:dstSubresource.layerCount# of each element of pname:pRegions must:
+ be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
****
include::../validity/protos/vkCmdBlitImage.txt[]
@@ -1660,6 +1686,20 @@ endif::VK_KHR_shared_presentable_image[]
* [[VUID-vkCmdResolveImage-srcImage-01386]]
pname:srcImage and pname:dstImage must: have been created with the same
image format
+ * The pname:srcSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The pname:dstSubresource.mipLevel member of each element of
+ pname:pRegions must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
+ * The [eq]#pname:srcSubresource.baseArrayLayer {plus}
+ pname:srcSubresource.layerCount# of each element of pname:pRegions must:
+ be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:srcImage was created
+ * The [eq]#pname:dstSubresource.baseArrayLayer {plus}
+ pname:dstSubresource.layerCount# of each element of pname:pRegions must:
+ be less than or equal to the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:dstImage was created
****
include::../validity/protos/vkCmdResolveImage.txt[]
diff --git a/doc/specs/vulkan/chapters/descriptorsets.txt b/doc/specs/vulkan/chapters/descriptorsets.txt
index de99389..42d0494 100644
--- a/doc/specs/vulkan/chapters/descriptorsets.txt
+++ b/doc/specs/vulkan/chapters/descriptorsets.txt
@@ -747,7 +747,7 @@ avoid wasted memory.
If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or
ename:VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and
pname:descriptorCount is not `0` and pname:pImmutableSamplers is not
- `NULL`, pname:pImmutableSamplers must: be a pointer to an array of
+ `NULL`, pname:pImmutableSamplers must: be a valid pointer to an array of
pname:descriptorCount valid sname:VkSampler handles
* [[VUID-VkDescriptorSetLayoutBinding-descriptorCount-00283]]
If pname:descriptorCount is not `0`, pname:stageFlags must: be a valid
@@ -1665,7 +1665,7 @@ in pname:pDescriptorSets are invalid.
All submitted commands that refer to any element of
pname:pDescriptorSets must: have completed execution
* [[VUID-vkFreeDescriptorSets-pDescriptorSets-00310]]
- pname:pDescriptorSets must: be a pointer to an array of
+ pname:pDescriptorSets must: be a valid pointer to an array of
pname:descriptorSetCount sname:VkDescriptorSet handles, each element of
which must: either be a valid handle or dlink:VK_NULL_HANDLE
* [[VUID-vkFreeDescriptorSets-pDescriptorSets-00311]]
@@ -1838,19 +1838,19 @@ bindings as needed to update all pname:descriptorCount descriptors.
ename:VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE,
ename:VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, or
ename:VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, pname:pImageInfo must: be a
- pointer to an array of pname:descriptorCount valid
+ valid pointer to an array of pname:descriptorCount valid
sname:VkDescriptorImageInfo structures
* [[VUID-VkWriteDescriptorSet-descriptorType-00323]]
If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
or ename:VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, pname:pTexelBufferView
- must: be a pointer to an array of pname:descriptorCount valid
+ must: be a valid pointer to an array of pname:descriptorCount valid
sname:VkBufferView handles
* [[VUID-VkWriteDescriptorSet-descriptorType-00324]]
If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER,
ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
ename:VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or
ename:VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pname:pBufferInfo must:
- be a pointer to an array of pname:descriptorCount valid
+ be a valid pointer to an array of pname:descriptorCount valid
sname:VkDescriptorBufferInfo structures
* [[VUID-VkWriteDescriptorSet-descriptorType-00325]]
If pname:descriptorType is ename:VK_DESCRIPTOR_TYPE_SAMPLER or
@@ -2434,8 +2434,8 @@ include::../api/protos/vkUpdateDescriptorSetWithTemplateKHR.txt[]
.Valid Usage
****
* [[VUID-vkUpdateDescriptorSetWithTemplateKHR-pData-01685]]
- pname:pData must: be a pointer to a memory that contains one or more
- valid instances of slink:VkDescriptorImageInfo,
+ pname:pData must: be a valid pointer to a memory that contains one or
+ more valid instances of slink:VkDescriptorImageInfo,
slink:VkDescriptorBufferInfo, or slink:VkBufferView in a layout defined
by pname:descriptorUpdateTemplate when it was created with
flink:vkCreateDescriptorUpdateTemplateKHR
@@ -2768,8 +2768,8 @@ include::../api/protos/vkCmdPushDescriptorSetWithTemplateKHR.txt[]
update template must: be supported by the pname:commandBuffer's parent
sname:VkCommandPool's queue family
* [[VUID-vkCmdPushDescriptorSetWithTemplateKHR-pData-01686]]
- pname:pData must: be a pointer to a memory that contains one or more
- valid instances of slink:VkDescriptorImageInfo,
+ pname:pData must: be a valid pointer to a memory that contains one or
+ more valid instances of slink:VkDescriptorImageInfo,
slink:VkDescriptorBufferInfo, or slink:VkBufferView in a layout defined
by pname:descriptorUpdateTemplate when it was created with
flink:vkCreateDescriptorUpdateTemplateKHR
diff --git a/doc/specs/vulkan/chapters/fragops.txt b/doc/specs/vulkan/chapters/fragops.txt
index 771fa5c..30b87d3 100644
--- a/doc/specs/vulkan/chapters/fragops.txt
+++ b/doc/specs/vulkan/chapters/fragops.txt
@@ -134,7 +134,7 @@ pname:discardRectangleCount)#.
sname:VkPhysicalDeviceDiscardRectanglePropertiesEXT::pname:maxDiscardRectangles,
inclusive
* [[VUID-vkCmdSetDiscardRectangleEXT-pDiscardRectangles-00586]]
- pname:pDiscardRectangles must: be a pointer to an array of
+ pname:pDiscardRectangles must: be a valid pointer to an array of
pname:discardRectangleCount valid sname:VkRect2D structures
* [[VUID-vkCmdSetDiscardRectangleEXT-x-00587]]
The pname:x and pname:y members of pname:offset in sname:VkRect2D must:
diff --git a/doc/specs/vulkan/chapters/fundamentals.txt b/doc/specs/vulkan/chapters/fundamentals.txt
index dddc4a3..cd3698a 100644
--- a/doc/specs/vulkan/chapters/fundamentals.txt
+++ b/doc/specs/vulkan/chapters/fundamentals.txt
@@ -268,10 +268,12 @@ frees.
It is an application's responsibility to track the lifetime of Vulkan
objects, and not to destroy them while they are still in use.
-Application-owned memory is immediately consumed by any Vulkan command it is
-passed into.
-The application can: alter or free this memory as soon as the commands that
-consume it have returned.
+[[fundamentals-objectmodel-lifetime-acquire]]
+The ownership of application-owned memory is immediately acquired by any
+Vulkan command it is passed into.
+Ownership of such memory must: be released back to the application at the
+end of the duration of the command, so that the application can: alter or
+free this memory as soon as all the commands that acquired it have returned.
The following object types are consumed when they are passed into a Vulkan
command and not further accessed by the objects they are used to create.
@@ -600,6 +602,16 @@ library) perform memory barriers as a part of mutual exclusion, so mutexing
Vulkan objects via these primitives will have the desired effect.
====
+Similarly the application must: avoid any potential data hazard of
+application-owned memory that has its
+<<fundamentals-objectmodel-lifetime-acquire,ownership temporarily acquired>>
+by a Vulkan command.
+While the ownership of application-owned memory remains acquired by a
+command the implementation may: read the memory at any point, and it may:
+write non-code:const qualified memory at any point.
+Parameters referring to non-code:const qualified application-owned memory
+are not marked explicitly as _externally synchronized_ in the specification.
+
Many object types are _immutable_, meaning the objects cannot: change once
they have been created.
These types of objects never need external synchronization, except that they
@@ -754,13 +766,13 @@ commands, which will silently ignore these values.
[[fundamentals-validusage-pointers]]
==== Valid Usage for Pointers
-Any parameter that is a pointer must: either be a valid pointer, or if
-_explicitly called out in the specification_, can: be `NULL`.
-A pointer is valid if it points at memory containing values of the number
-and type(s) expected by the command, and all fundamental types accessed
-through the pointer (e.g. as elements of an array or as members of a
-structure) satisfy the alignment requirements of the host processor.
+Any parameter that is a pointer must: be a _valid pointer_ only if it is
+explicitly called out by a Valid Usage statement.
+A pointer is "`valid`" if it points at memory containing values of the
+number and type(s) expected by the command, and all fundamental types
+accessed through the pointer (e.g. as elements of an array or as members of
+a structure) satisfy the alignment requirements of the host processor.
[[fundamentals-validusage-strings]]
==== Valid Usage for Strings
diff --git a/doc/specs/vulkan/chapters/memory.txt b/doc/specs/vulkan/chapters/memory.txt
index e3d9802..d2dd2b9 100644
--- a/doc/specs/vulkan/chapters/memory.txt
+++ b/doc/specs/vulkan/chapters/memory.txt
@@ -60,13 +60,13 @@ include::../api/structs/VkAllocationCallbacks.txt[]
.Valid Usage
****
* [[VUID-VkAllocationCallbacks-pfnAllocation-00632]]
- pname:pfnAllocation must: be a pointer to a valid user-defined
+ pname:pfnAllocation must: be a valid pointer to a valid user-defined
tlink:PFN_vkAllocationFunction
* [[VUID-VkAllocationCallbacks-pfnReallocation-00633]]
- pname:pfnReallocation must: be a pointer to a valid user-defined
+ pname:pfnReallocation must: be a valid pointer to a valid user-defined
tlink:PFN_vkReallocationFunction
* [[VUID-VkAllocationCallbacks-pfnFree-00634]]
- pname:pfnFree must: be a pointer to a valid user-defined
+ pname:pfnFree must: be a valid pointer to a valid user-defined
tlink:PFN_vkFreeFunction
* [[VUID-VkAllocationCallbacks-pfnInternalAllocation-00635]]
If either of pname:pfnInternalAllocation or pname:pfnInternalFree is not
@@ -446,9 +446,9 @@ endif::VK_EXT_validation_cache[]
[[memory-device]]
== Device Memory
-Device memory is memory that is visible to the device, for example the
-contents of opaque images that can: be natively used by the device, or
-uniform buffer objects that reside in on-device memory.
+_Device memory_ is memory that is visible to the device -- for example
+the contents of the image or buffer objects, which can: be natively used by
+the device.
Memory properties of a physical device describe the memory heaps and memory
types available.
@@ -500,48 +500,48 @@ different properties.
The number of memory heaps is given by pname:memoryHeapCount and is less
than or equal to ename:VK_MAX_MEMORY_HEAPS.
-Each heap is described by an element of the pname:memoryHeaps array, as a
-sname:VkMemoryHeap structure.
+Each heap is described by an element of the pname:memoryHeaps array as a
+slink:VkMemoryHeap structure.
The number of memory types available across all memory heaps is given by
pname:memoryTypeCount and is less than or equal to
ename:VK_MAX_MEMORY_TYPES.
-Each memory type is described by an element of the pname:memoryTypes array,
-as a sname:VkMemoryType structure.
+Each memory type is described by an element of the pname:memoryTypes array
+as a slink:VkMemoryType structure.
At least one heap must: include ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT in
slink:VkMemoryHeap::pname:flags.
If there are multiple heaps that all have similar performance
characteristics, they may: all include
ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT.
-In a unified memory architecture (UMA) system, there is often only a single
+In a unified memory architecture (UMA) system there is often only a single
memory heap which is considered to be equally "`local`" to the host and to
the device, and such an implementation must: advertise the heap as
device-local.
-
+[[memory-device-bitmask-list]]
Each memory type returned by flink:vkGetPhysicalDeviceMemoryProperties must:
have its pname:propertyFlags set to one of the following values:
* 0
- * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | +
ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
- * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | +
ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT
- * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
- ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
+ * ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | +
+ ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | +
ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
* ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
- * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
- ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | +
+ ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | +
ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
- * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
- ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | +
+ ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | +
ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT
- * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
- ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
- ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT |
+ * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | +
+ ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | +
+ ename:VK_MEMORY_PROPERTY_HOST_CACHED_BIT | +
ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
- * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
+ * ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | +
ename:VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
There must: be at least one memory type with both the
@@ -552,57 +552,75 @@ There must: be at least one memory type with the
ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit set in its
pname:propertyFlags.
-The memory types are sorted according to a preorder which serves to aid in
-easily selecting an appropriate memory type.
-Given two memory types X and Y, the preorder defines [eq]#X {leq} Y# if:
+For each pair of elements *X* and *Y* returned in pname:memoryTypes, *X*
+must: be placed at a lower index position than *Y* if:
+
+ * either the set of bit flags returned in the pname:propertyFlags member
+ of *X* is a strict subset of the set of bit flags returned in the
+ pname:propertyFlags member of *Y*.
+ * or the pname:propertyFlags members of *X* and *Y* are equal, and *X*
+ belongs to a memory heap with greater performance (as determined in an
+ implementation-specific manner).
- * the memory property bits set for X are a strict subset of the memory
- property bits set for Y. Or,
- * the memory property bits set for X are the same as the memory property
- bits set for Y, and X uses a memory heap with greater or equal
- performance (as determined in an implementation-specific manner).
+[NOTE]
+.Note
+====
+There is no ordering requirement between *X* and *Y* elements for the case
+their pname:propertyFlags members are not in a subset relation.
+That potentially allows more than one possible way to order the same set of
+memory types.
+Notice that the
+<<memory-device-bitmask-list,list of all allowed memory property flag combinations>>
+is written in the required order.
+But if instead
+ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT was before
+ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
+ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
+the list would still be in the required order.
+====
-Memory types are ordered in the list such that X is assigned a lesser
-pname:memoryTypeIndex than Y if [eq]#(X {leq} Y) {land} {lnot} (Y {leq} X)#
-according to the preorder.
-Note that the list of all allowed memory property flag combinations above
-satisfies this preorder, but other orders would as well.
-The goal of this ordering is to enable applications to use a simple search
-loop in selecting the proper memory type, along the lines of:
+This ordering requirement enables applications to use a simple search loop
+to select the desired memory type along the lines of:
[source,c++]
---------------------------------------------------
-// Find a memory type in "memoryTypeBits" that includes all of "properties"
-int32_t FindProperties(uint32_t memoryTypeBits, VkMemoryPropertyFlags properties)
-{
- for (int32_t i = 0; i < memoryTypeCount; ++i)
- {
- if ((memoryTypeBits & (1 << i)) &&
- ((memoryTypes[i].propertyFlags & properties) == properties))
- return i;
+// Find a memory in `memoryTypeBitsRequirement` that includes all of `requiredProperties`
+int32_t findProperties(const VkPhysicalDeviceMemoryProperties* pMemoryProperties,
+ uint32_t memoryTypeBitsRequirement,
+ VkMemoryPropertyFlags requiredProperties) {
+ const uint32_t memoryCount = pMemoryProperties->memoryTypeCount;
+ for (uint32_t memoryIndex = 0; memoryIndex < memoryCount; ++memoryIndex) {
+ const uint32_t memoryTypeBits = (1 << memoryIndex);
+ const bool isRequiredMemoryType = memoryTypeBitsRequirement & memoryTypeBits;
+
+ const VkMemoryPropertyFlags properties =
+ pMemoryProperties->memoryTypes[memoryIndex].propertyFlags;
+ const bool hasRequiredProperties =
+ (properties & requiredProperties) == requiredProperties;
+
+ if (isRequiredMemoryType && hasRequiredProperties)
+ return static_cast<int32_t>(memoryIndex);
}
+
+ // failed to find memory type
return -1;
}
-// Try to find an optimal memory type, or if it does not exist
-// find any compatible memory type
+// Try to find an optimal memory type, or if it does not exist try fallback memory type
+// `device` is the VkDevice
+// `image` is the VkImage that requires memory to be bound
+// `memoryProperties` properties as returned by vkGetPhysicalDeviceMemoryProperties
+// `requiredProperties` are the property flags that must be present
+// `optimalProperties` are the property flags that are preferred by the application
VkMemoryRequirements memoryRequirements;
vkGetImageMemoryRequirements(device, image, &memoryRequirements);
-int32_t memoryType = FindProperties(memoryRequirements.memoryTypeBits, optimalProperties);
-if (memoryType == -1)
- memoryType = FindProperties(memoryRequirements.memoryTypeBits, requiredProperties);
+int32_t memoryType =
+ findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, optimalProperties);
+if (memoryType == -1) // not found; try fallback properties
+ memoryType =
+ findProperties(&memoryProperties, memoryRequirements.memoryTypeBits, requiredProperties);
---------------------------------------------------
-The loop will find the first supported memory type that has all bits
-requested in code:properties set.
-If there is no exact match, it will find a closest match (i.e. a memory type
-with the fewest additional bits set), which has some additional bits set but
-which are not detrimental to the behaviors requested by code:properties.
-The application can: first search for the optimal properties, e.g. a memory
-type that is device-local or supports coherent cached accesses, as
-appropriate for the intended usage, and if such a memory type is not present
-can: fallback to searching for a less optimal but guaranteed set of
-properties such as "0" or "host-visible and coherent".
include::../validity/structs/VkPhysicalDeviceMemoryProperties.txt[]
--
@@ -691,7 +709,7 @@ include::../api/structs/VkMemoryType.txt[]
* pname:heapIndex describes which memory heap this memory type corresponds
to, and must: be less than pname:memoryHeapCount from the
- sname:VkPhysicalDeviceMemoryProperties structure.
+ slink:VkPhysicalDeviceMemoryProperties structure.
* pname:propertyFlags is a bitmask of elink:VkMemoryPropertyFlagBits of
properties for this memory type.
@@ -708,8 +726,8 @@ include::../api/enums/VkMemoryPropertyFlagBits.txt[]
* ename:VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT bit indicates that memory
allocated with this type is the most efficient for device access.
- This property will only be set for memory types belonging to heaps with
- the ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.
+ This property will be set if and only if the memory type belongs to a
+ heap with the ename:VK_MEMORY_HEAP_DEVICE_LOCAL_BIT set.
* ename:VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT bit indicates that memory
allocated with this type can: be mapped for host access using
flink:vkMapMemory.
@@ -736,9 +754,7 @@ include::../api/enums/VkMemoryPropertyFlagBits.txt[]
--
A Vulkan device operates on data in device memory via memory objects that
-are represented in the API by a sname:VkDeviceMemory handle.
-
-Memory objects are represented by sname:VkDeviceMemory handles:
+are represented in the API by a sname:VkDeviceMemory handle:
include::../api/handles/VkDeviceMemory.txt[]
@@ -763,7 +779,7 @@ include::../api/protos/vkAllocateMemory.txt[]
information about the allocated memory is returned.
Allocations returned by fname:vkAllocateMemory are guaranteed to meet any
-alignment requirement by the implementation.
+alignment requirement of the implementation.
For example, if an implementation requires 128 byte alignment for images and
64 byte alignment for buffers, the device memory returned through this
mechanism would be 128-byte aligned.
@@ -774,29 +790,30 @@ same memory object.
When memory is allocated, its contents are undefined.
There is an implementation-dependent maximum number of memory allocations
-which can: be simultaneously created on a device.
+that can: be simultaneously created on a device.
This is specified by the
<<features-limits-maxMemoryAllocationCount,pname:maxMemoryAllocationCount>>
-member of the sname:VkPhysicalDeviceLimits structure.
+member of the slink:VkPhysicalDeviceLimits structure.
If pname:maxMemoryAllocationCount is exceeded, fname:vkAllocateMemory will
return ename:VK_ERROR_TOO_MANY_OBJECTS.
-[NOTE]
-.Note
-====
Some platforms may: have a limit on the maximum size of a single allocation.
For example, certain systems may: fail to create allocations with a size
greater than or equal to 4GB.
Such a limit is implementation-dependent, and if such a failure occurs then
-the error ename:VK_ERROR_OUT_OF_DEVICE_MEMORY should: be returned.
-====
+the error ename:VK_ERROR_OUT_OF_DEVICE_MEMORY must: be returned.
.Valid Usage
****
- * [[VUID-vkAllocateMemory-device-00636]]
- The number of currently valid memory objects, allocated from
- pname:device, must: be less than
- sname:VkPhysicalDeviceLimits::pname:maxMemoryAllocationCount
+ * pname:pAllocateInfo\->pname:allocationSize must: be less than or equal
+ to
+ slink:VkPhysicalDeviceMemoryProperties::pname:memoryHeaps[pname:pAllocateInfo\->pname:memoryTypeIndex].pname:size
+ as returned by flink:vkGetPhysicalDeviceMemoryProperties for the
+ slink:VkPhysicalDevice that pname:device was created from.
+ * pname:pAllocateInfo\->pname:memoryTypeIndex must: be less than
+ slink:VkPhysicalDeviceMemoryProperties::pname:memoryTypeCount as
+ returned by flink:vkGetPhysicalDeviceMemoryProperties for the
+ slink:VkPhysicalDevice that pname:device was created from.
****
include::../validity/protos/vkAllocateMemory.txt[]
@@ -812,9 +829,9 @@ include::../api/structs/VkMemoryAllocateInfo.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
* pname:allocationSize is the size of the allocation in bytes
- * pname:memoryTypeIndex is the memory type index, which selects the
- properties of the memory to be allocated, as well as the heap the memory
- will come from.
+ * pname:memoryTypeIndex is an index identifying a memory type from the
+ pname:memoryTypes array of the slink:VkPhysicalDeviceMemoryProperties
+ structure
ifdef::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[]
If the pname:pNext chain contains an instance of
@@ -865,10 +882,6 @@ endif::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[]
.Valid Usage
****
- * [[VUID-VkMemoryAllocateInfo-allocationSize-00637]]
- pname:allocationSize must: be less than or equal to the amount of memory
- available to the sname:VkMemoryHeap specified by pname:memoryTypeIndex
- and the calling command's sname:VkDevice
* [[VUID-VkMemoryAllocateInfo-allocationSize-00638]]
pname:allocationSize must: be greater than `0`
ifdef::VK_KHR_external_memory[]
@@ -971,41 +984,41 @@ include::../api/structs/VkMemoryDedicatedAllocateInfoKHR.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
- * pname:image is sname:VK_NULL_HANDLE or a handle of an image which this
+ * pname:image is dlink:VK_NULL_HANDLE or a handle of an image which this
memory will be bound to.
- * pname:buffer is sname:VK_NULL_HANDLE or a handle of a buffer which this
+ * pname:buffer is dlink:VK_NULL_HANDLE or a handle of a buffer which this
memory will be bound to.
.Valid Usage
****
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-image-01432]]
At least one of pname:image and pname:buffer must: be
- sname:VK_NULL_HANDLE
+ dlink:VK_NULL_HANDLE
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-image-01433]]
- If pname:image is not sname:VK_NULL_HANDLE,
+ If pname:image is not dlink:VK_NULL_HANDLE,
sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the
sname:VkMemoryRequirements::pname:size of the image
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-image-01434]]
- If pname:image is not sname:VK_NULL_HANDLE, pname:image must: have been
+ If pname:image is not dlink:VK_NULL_HANDLE, pname:image must: have been
created without ename:VK_IMAGE_CREATE_SPARSE_BINDING_BIT set in
- sname:VkImageCreateInfo::pname:flags
+ slink:VkImageCreateInfo::pname:flags
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01435]]
- If pname:buffer is not sname:VK_NULL_HANDLE,
+ If pname:buffer is not dlink:VK_NULL_HANDLE,
sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the
sname:VkMemoryRequirements::pname:size of the buffer
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01436]]
- If pname:buffer is not sname:VK_NULL_HANDLE, pname:buffer must: have
+ If pname:buffer is not dlink:VK_NULL_HANDLE, pname:buffer must: have
been created without ename:VK_BUFFER_CREATE_SPARSE_BINDING_BIT set in
- sname:VkBufferCreateInfo::pname:flags
+ slink:VkBufferCreateInfo::pname:flags
ifdef::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[]
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-image-01437]]
- If pname:image is not sname:VK_NULL_HANDLE and
+ If pname:image is not dlink:VK_NULL_HANDLE and
slink:VkMemoryAllocateInfo defines a memory import operation, the memory
being imported must: also be a dedicated image allocation and
pname:image must be identical to the image associated with the imported
memory.
* [[VUID-VkMemoryDedicatedAllocateInfoKHR-buffer-01438]]
- If pname:buffer is not sname:VK_NULL_HANDLE and
+ If pname:buffer is not dlink:VK_NULL_HANDLE and
slink:VkMemoryAllocateInfo defines a memory import operation, the memory
being imported must: also be a dedicated buffer allocation and
pname:buffer must be identical to the buffer associated with the
@@ -1034,43 +1047,43 @@ include::../api/structs/VkDedicatedAllocationMemoryAllocateInfoNV.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
- * pname:image is sname:VK_NULL_HANDLE or a handle of an image which this
+ * pname:image is dlink:VK_NULL_HANDLE or a handle of an image which this
memory will be bound to.
- * pname:buffer is sname:VK_NULL_HANDLE or a handle of a buffer which this
+ * pname:buffer is dlink:VK_NULL_HANDLE or a handle of a buffer which this
memory will be bound to.
.Valid Usage
****
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00649]]
At least one of pname:image and pname:buffer must: be
- sname:VK_NULL_HANDLE
+ dlink:VK_NULL_HANDLE
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00650]]
- If pname:image is not sname:VK_NULL_HANDLE, the image must: have been
+ If pname:image is not dlink:VK_NULL_HANDLE, the image must: have been
created with
sname:VkDedicatedAllocationImageCreateInfoNV::pname:dedicatedAllocation
equal to ename:VK_TRUE
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00651]]
- If pname:buffer is not sname:VK_NULL_HANDLE, the buffer must: have been
+ If pname:buffer is not dlink:VK_NULL_HANDLE, the buffer must: have been
created with
sname:VkDedicatedAllocationBufferCreateInfoNV::pname:dedicatedAllocation
equal to ename:VK_TRUE
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00652]]
- If pname:image is not sname:VK_NULL_HANDLE,
+ If pname:image is not dlink:VK_NULL_HANDLE,
sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the
sname:VkMemoryRequirements::pname:size of the image
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00653]]
- If pname:buffer is not sname:VK_NULL_HANDLE,
+ If pname:buffer is not dlink:VK_NULL_HANDLE,
sname:VkMemoryAllocateInfo::pname:allocationSize must: equal the
sname:VkMemoryRequirements::pname:size of the buffer
ifdef::VK_KHR_external_memory_win32,VK_KHR_external_memory_fd[]
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-image-00654]]
- If pname:image is not sname:VK_NULL_HANDLE and
+ If pname:image is not dlink:VK_NULL_HANDLE and
slink:VkMemoryAllocateInfo defines a memory import operation, the memory
being imported must: also be a dedicated image allocation and
pname:image must: be identical to the image associated with the imported
memory.
* [[VUID-VkDedicatedAllocationMemoryAllocateInfoNV-buffer-00655]]
- If pname:buffer is not sname:VK_NULL_HANDLE and
+ If pname:buffer is not dlink:VK_NULL_HANDLE and
slink:VkMemoryAllocateInfo defines a memory import operation, the memory
being imported must: also be a dedicated buffer allocation and
pname:buffer must: be identical to the buffer associated with the
@@ -1201,7 +1214,7 @@ include::../api/structs/VkImportMemoryWin32HandleInfoKHR.txt[]
Importing memory objects from Windows handles does not transfer ownership of
the handle to the Vulkan implementation.
For handle types defined as NT handles, the application must: release
-ownership using the fname:CloseHandle system call when the handle is no
+ownership using the code:CloseHandle system call when the handle is no
longer needed.
Applications can: import the same underlying memory into multiple instances
@@ -1273,7 +1286,7 @@ include::../api/protos/vkGetMemoryWin32HandleKHR.txt[]
For handle types defined as NT handles, the handles returned by
fname:vkGetMemoryWin32HandleKHR are owned by the application.
To avoid leaking resources, the application must: release ownership of them
-using the fname:CloseHandle system call when they are no longer needed.
+using the code:CloseHandle system call when they are no longer needed.
include::../validity/protos/vkGetMemoryWin32HandleKHR.txt[]
--
@@ -1430,10 +1443,10 @@ include::../api/protos/vkGetMemoryFdKHR.txt[]
Each call to fname:vkGetMemoryFdKHR must: create a new file descriptor and
transfer ownership of it to the application.
To avoid leaking resources, the application must: release ownership of the
-file descriptor using the fname:close system call when it is no longer
+file descriptor using the code:close system call when it is no longer
needed, or by importing a Vulkan memory object from it.
Where supported by the operating system, the implementation must: set the
-file descriptor to be closed automatically when an fname:execve system call
+file descriptor to be closed automatically when an code:execve system call
is made.
include::../validity/protos/vkGetMemoryFdKHR.txt[]
@@ -1619,7 +1632,7 @@ include::../api/protos/vkFreeMemory.txt[]
Before freeing a memory object, an application must: ensure the memory
object is no longer in use by the device--for example by command buffers
-queued for execution.
+in the _pending state_.
The memory can: remain bound to images or buffers at the time the memory
object is freed, but any further use of them (on host or device) for
anything other than destroying those objects will result in undefined
@@ -1659,7 +1672,7 @@ include::../validity/protos/vkFreeMemory.txt[]
[[memory-device-hostaccess]]
=== Host Access to Device Memory Objects
-Memory objects created with fname:vkAllocateMemory are not directly host
+Memory objects created with flink:vkAllocateMemory are not directly host
accessible.
Memory objects created with the memory property
@@ -1686,7 +1699,7 @@ include::../api/protos/vkMapMemory.txt[]
* pname:ppData points to a pointer in which is returned a host-accessible
pointer to the beginning of the mapped range.
This pointer minus pname:offset must: be aligned to at least
- sname:VkPhysicalDeviceLimits::pname:minMemoryMapAlignment.
+ slink:VkPhysicalDeviceLimits::pname:minMemoryMapAlignment.
It is an application error to call fname:vkMapMemory on a memory object that
is already mapped.
@@ -1717,9 +1730,9 @@ If the device memory was allocated without the
ename:VK_MEMORY_PROPERTY_HOST_COHERENT_BIT set, these guarantees must: be
made for an extended range: the application must: round down the start of
the range to the nearest multiple of
-sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize, and round the end
+slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize, and round the end
of the range up to the nearest multiple of
-sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize.
+slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize.
While a range of device memory is mapped for host access, the application is
responsible for synchronizing both device and host access to that memory
@@ -1875,15 +1888,15 @@ include::../api/structs/VkMappedMemoryRange.txt[]
* [[VUID-VkMappedMemoryRange-size-01389]]
If pname:size is equal to ename:VK_WHOLE_SIZE, the end of the current
mapping of pname:memory must: be a multiple of
- sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize bytes from the
+ slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize bytes from the
beginning of the memory object.
* [[VUID-VkMappedMemoryRange-offset-00687]]
pname:offset must: be a multiple of
- sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize
+ slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize
* [[VUID-VkMappedMemoryRange-size-01390]]
If pname:size is not equal to ename:VK_WHOLE_SIZE, pname:size must:
either be a multiple of
- sname:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize, or pname:offset
+ slink:VkPhysicalDeviceLimits::pname:nonCoherentAtomSize, or pname:offset
plus pname:size must: equal the size of pname:memory.
****
diff --git a/doc/specs/vulkan/chapters/pipelines.txt b/doc/specs/vulkan/chapters/pipelines.txt
index 6e14a1a..5121410 100644
--- a/doc/specs/vulkan/chapters/pipelines.txt
+++ b/doc/specs/vulkan/chapters/pipelines.txt
@@ -523,7 +523,7 @@ endif::VK_NV_glsl_shader[]
* [[VUID-VkGraphicsPipelineCreateInfo-pStages-00731]]
If pname:pStages includes a tessellation control shader stage and a
tessellation evaluation shader stage, pname:pTessellationState must: be
- a pointer to a valid sname:VkPipelineTessellationStateCreateInfo
+ a valid pointer to a valid sname:VkPipelineTessellationStateCreateInfo
structure
* [[VUID-VkGraphicsPipelineCreateInfo-pStages-00732]]
If pname:pStages includes tessellation shader stages, the shader code of
@@ -616,12 +616,12 @@ endif::VK_KHR_maintenance2[]
* [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00747]]
If no element of the pname:pDynamicStates member of pname:pDynamicState
is ename:VK_DYNAMIC_STATE_VIEWPORT, the pname:pViewports member of
- pname:pViewportState must: be a pointer to an array of
+ pname:pViewportState must: be a valid pointer to an array of
pname:pViewportState::pname:viewportCount sname:VkViewport structures
* [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00748]]
If no element of the pname:pDynamicStates member of pname:pDynamicState
is ename:VK_DYNAMIC_STATE_SCISSOR, the pname:pScissors member of
- pname:pViewportState must: be a pointer to an array of
+ pname:pViewportState must: be a valid pointer to an array of
pname:pViewportState::pname:scissorCount sname:VkRect2D structures
* [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749]]
If the wide lines feature is not enabled, and no element of the
@@ -630,21 +630,21 @@ endif::VK_KHR_maintenance2[]
pname:pRasterizationState must: be `1.0`
* [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00750]]
If the pname:rasterizerDiscardEnable member of pname:pRasterizationState
- is ename:VK_FALSE, pname:pViewportState must: be a pointer to a valid
- sname:VkPipelineViewportStateCreateInfo structure
+ is ename:VK_FALSE, pname:pViewportState must: be a valid pointer to a
+ valid sname:VkPipelineViewportStateCreateInfo structure
* [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00751]]
If the pname:rasterizerDiscardEnable member of pname:pRasterizationState
- is ename:VK_FALSE, pname:pMultisampleState must: be a pointer to a valid
- sname:VkPipelineMultisampleStateCreateInfo structure
+ is ename:VK_FALSE, pname:pMultisampleState must: be a valid pointer to a
+ valid sname:VkPipelineMultisampleStateCreateInfo structure
* [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00752]]
If the pname:rasterizerDiscardEnable member of pname:pRasterizationState
is ename:VK_FALSE, and pname:subpass uses a depth/stencil attachment,
- pname:pDepthStencilState must: be a pointer to a valid
+ pname:pDepthStencilState must: be a valid pointer to a valid
sname:VkPipelineDepthStencilStateCreateInfo structure
* [[VUID-VkGraphicsPipelineCreateInfo-rasterizerDiscardEnable-00753]]
If the pname:rasterizerDiscardEnable member of pname:pRasterizationState
is ename:VK_FALSE, and pname:subpass uses color attachments,
- pname:pColorBlendState must: be a pointer to a valid
+ pname:pColorBlendState must: be a valid pointer to a valid
sname:VkPipelineColorBlendStateCreateInfo structure
* [[VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754]]
If the depth bias clamping feature is not enabled, no element of the
@@ -771,6 +771,18 @@ endif::VK_KHR_maintenance2[]
The number of resources in pname:layout accessible to each shader stage
that is used by the pipeline must: be less than or equal to
sname:VkPhysicalDeviceLimits::pname:maxPerStageResources
+ifdef::VK_NV_clip_space_w_scaling[]
+ * If no element of the pname:pDynamicStates member of pname:pDynamicState
+ is ename:VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV, and the
+ pname:viewportWScalingEnable member of a
+ slink:VkPipelineViewportWScalingStateCreateInfoNV structure, chained to
+ the pname:pNext chain of pname:pViewportState, is ename:VK_TRUE,
+ the pname:pViewportWScalings member of the
+ slink:VkPipelineViewportWScalingStateCreateInfoNV must: be a pointer to
+ an array of
+ slink:VkPipelineViewportWScalingStateCreateInfoNV::pname:viewportCount
+ valid slink:VkViewportWScalingNV structures
+endif::VK_NV_clip_space_w_scaling[]
****
include::../validity/structs/VkGraphicsPipelineCreateInfo.txt[]
@@ -1390,9 +1402,9 @@ slink:VkSpecializationMapEntry.
The pname:size member of each element of pname:pMapEntries must: be less
than or equal to pname:dataSize minus pname:offset
* [[VUID-VkSpecializationInfo-mapEntryCount-00775]]
- If pname:mapEntryCount is not `0`, pname:pMapEntries must: be a pointer
- to an array of pname:mapEntryCount valid sname:VkSpecializationMapEntry
- structures
+ If pname:mapEntryCount is not `0`, pname:pMapEntries must: be a valid
+ pointer to an array of pname:mapEntryCount valid
+ sname:VkSpecializationMapEntry structures
****
include::../validity/structs/VkSpecializationInfo.txt[]
diff --git a/doc/specs/vulkan/chapters/renderpass.txt b/doc/specs/vulkan/chapters/renderpass.txt
index d92a07d..97e25bf 100644
--- a/doc/specs/vulkan/chapters/renderpass.txt
+++ b/doc/specs/vulkan/chapters/renderpass.txt
@@ -1753,7 +1753,7 @@ pass.
pname:stencilLoadOp, if the attachment has a depth/stencil format) of
ename:VK_ATTACHMENT_LOAD_OP_CLEAR
* [[VUID-VkRenderPassBeginInfo-clearValueCount-00903]]
- If pname:clearValueCount is not `0`, pname:pClearValues must: be a
+ If pname:clearValueCount is not `0`, pname:pClearValues must: be a valid
pointer to an array of pname:clearValueCount valid sname:VkClearValue
unions
* [[VUID-VkRenderPassBeginInfo-renderPass-00904]]
diff --git a/doc/specs/vulkan/chapters/resources.txt b/doc/specs/vulkan/chapters/resources.txt
index 902ebc2..af9622b 100644
--- a/doc/specs/vulkan/chapters/resources.txt
+++ b/doc/specs/vulkan/chapters/resources.txt
@@ -95,7 +95,7 @@ endif::editing-notes[]
pname:size must: be greater than `0`
* [[VUID-VkBufferCreateInfo-sharingMode-00913]]
If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
- pname:pQueueFamilyIndices must: be a pointer to an array of
+ pname:pQueueFamilyIndices must: be a valid pointer to an array of
pname:queueFamilyIndexCount basetype:uint32_t values
* [[VUID-VkBufferCreateInfo-sharingMode-00914]]
If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
@@ -602,7 +602,7 @@ endif::VK_KHR_maintenance2[]
values passed to the corresponding parameters.
* [[VUID-VkImageCreateInfo-sharingMode-00941]]
If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
- pname:pQueueFamilyIndices must: be a pointer to an array of
+ pname:pQueueFamilyIndices must: be a valid pointer to an array of
pname:queueFamilyIndexCount basetype:uint32_t values
* [[VUID-VkImageCreateInfo-sharingMode-00942]]
If pname:sharingMode is ename:VK_SHARING_MODE_CONCURRENT,
@@ -1343,6 +1343,12 @@ image.
* [[VUID-vkGetImageSubresourceLayout-aspectMask-00997]]
The pname:aspectMask member of pname:pSubresource must: only have a
single bit set
+ * The pname:mipLevel member of pname:pSubresource must: be less than the
+ pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
+ was created
+ * The pname:arrayLayer member of pname:pSubresource must: be less than the
+ pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
+ was created
ifdef::VK_KHR_sampler_ycbcr_conversion[]
* [[VUID-vkGetImageSubresourceLayout-format-01581]]
If the pname:format of pname:image is a
@@ -1375,16 +1381,6 @@ include::../api/structs/VkImageSubresource.txt[]
* pname:mipLevel selects the mipmap level.
* pname:arrayLayer selects the array layer.
-.Valid Usage
-****
- * [[VUID-VkImageSubresource-mipLevel-00998]]
- pname:mipLevel must: be less than the pname:mipLevels specified in
- slink:VkImageCreateInfo when the image was created
- * [[VUID-VkImageSubresource-arrayLayer-00999]]
- pname:arrayLayer must: be less than the pname:arrayLayers specified in
- slink:VkImageCreateInfo when the image was created
-****
-
include::../validity/structs/VkImageSubresource.txt[]
--
@@ -2143,29 +2139,26 @@ endif::VK_KHR_maintenance1[]
by fname:vkGetPhysicalDeviceFormatProperties with the same value of
pname:format
* [[VUID-VkImageViewCreateInfo-subresourceRange-01478]]
- pname:subresourceRange::pname:baseMipLevel must: be less than the
+ pname:subresourceRange.baseMipLevel must: be less than the
+ pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
+ was created
+ * If pname:subresourceRange.levelCount is not
+ ename:VK_REMAINING_MIP_LEVELS,
+ [eq]#pname:subresourceRange.baseMipLevel {plus}
+ pname:subresourceRange.levelCount# must: be less than or equal to the
pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-VkImageViewCreateInfo-subresourceRange-01479]]
- If pname:subresourceRange::pname:levelCount is not
- ename:VK_REMAINING_MIP_LEVELS, pname:subresourceRange::pname:levelCount
- must: be non-zero and [eq]#pname:subresourceRange::pname:baseMipLevel
- {plus} pname:subresourceRange::pname:levelCount# must: be less than or
- equal to the pname:mipLevels specified in slink:VkImageCreateInfo when
- pname:image was created
ifndef::VK_KHR_maintenance1[]
* [[VUID-VkImageViewCreateInfo-subresourceRange-01480]]
- pname:subresourceRange::pname:baseArrayLayer must: be less than the
+ pname:subresourceRange.baseArrayLayer must: be less than the
pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-VkImageViewCreateInfo-subresourceRange-01481]]
- If pname:subresourceRange::pname:layerCount is not
+ * If pname:subresourceRange.layerCount is not
ename:VK_REMAINING_ARRAY_LAYERS,
- pname:subresourceRange::pname:layerCount must: be non-zero and
- [eq]#pname:subresourceRange::pname:baseArrayLayer {plus}
- pname:subresourceRange::pname:layerCount# must: be less than or equal to
- the pname:arrayLayers specified in slink:VkImageCreateInfo when
- pname:image was created
+ [eq]#pname:subresourceRange.baseArrayLayer {plus}
+ pname:subresourceRange.layerCount# must: be less than or equal to the
+ pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
+ was created
endif::VK_KHR_maintenance1[]
ifdef::VK_KHR_maintenance1[]
* [[VUID-VkImageViewCreateInfo-image-01482]]
@@ -2424,6 +2417,10 @@ endif::VK_KHR_sampler_ycbcr_conversion[]
.Valid Usage
****
+ * If pname:levelCount is not ename:VK_REMAINING_MIP_LEVELS, it must:
+ be greater than `0`
+ * If pname:layerCount is not ename:VK_REMAINING_ARRAY_LAYERS, it must:
+ be greater than `0`
* [[VUID-VkImageSubresourceRange-aspectMask-01670]]
If pname:aspectMask includes ename:VK_IMAGE_ASPECT_COLOR_BIT, then it
must: not include any of ename:VK_IMAGE_ASPECT_PLANE_0_BIT_KHR,
diff --git a/doc/specs/vulkan/chapters/sparsemem.txt b/doc/specs/vulkan/chapters/sparsemem.txt
index 917be5d..7890d06 100644
--- a/doc/specs/vulkan/chapters/sparsemem.txt
+++ b/doc/specs/vulkan/chapters/sparsemem.txt
@@ -1390,6 +1390,16 @@ include::../api/structs/VkSparseImageMemoryBindInfo.txt[]
* pname:pBinds is a pointer to array of sname:VkSparseImageMemoryBind
structures
+.Valid Usage
+****
+ * The pname:subresource.mipLevel member of each element of pname:pBinds
+ must: be less than the pname:mipLevels specified in
+ slink:VkImageCreateInfo when pname:image was created
+ * The pname:subresource.arrayLayer member of each element of pname:pBinds
+ must: be less than the pname:arrayLayers specified in
+ slink:VkImageCreateInfo when pname:image was created
+****
+
include::../validity/structs/VkSparseImageMemoryBindInfo.txt[]
--
diff --git a/doc/specs/vulkan/chapters/synchronization.txt b/doc/specs/vulkan/chapters/synchronization.txt
index 939c45d..c581d2c 100644
--- a/doc/specs/vulkan/chapters/synchronization.txt
+++ b/doc/specs/vulkan/chapters/synchronization.txt
@@ -3785,28 +3785,25 @@ endif::VK_KHR_external_memory[]
least one of them must: be the same as the family of the queue that will
execute this barrier
* [[VUID-VkImageMemoryBarrier-subresourceRange-01486]]
- pname:subresourceRange::pname:baseMipLevel must: be less than the
+ pname:subresourceRange.baseMipLevel must: be less than the
+ pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
+ was created
+ * If pname:subresourceRange.levelCount is not
+ ename:VK_REMAINING_MIP_LEVELS,
+ [eq]#pname:subresourceRange.baseMipLevel {plus}
+ pname:subresourceRange.levelCount# must: be less than or equal to the
pname:mipLevels specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-VkImageMemoryBarrier-subresourceRange-01487]]
- If pname:subresourceRange::pname:levelCount is not
- ename:VK_REMAINING_MIP_LEVELS, pname:subresourceRange::pname:levelCount
- must: be non-zero and [eq]#pname:subresourceRange::pname:baseMipLevel
- {plus} pname:subresourceRange::pname:levelCount# must: be less than or
- equal to the pname:mipLevels specified in slink:VkImageCreateInfo when
- pname:image was created
* [[VUID-VkImageMemoryBarrier-subresourceRange-01488]]
- pname:subresourceRange::pname:baseArrayLayer must: be less than the
+ pname:subresourceRange.baseArrayLayer must: be less than the
pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
was created
- * [[VUID-VkImageMemoryBarrier-subresourceRange-01489]]
- If pname:subresourceRange::pname:layerCount is not
+ * If pname:subresourceRange.layerCount is not
ename:VK_REMAINING_ARRAY_LAYERS,
- pname:subresourceRange::pname:layerCount must: be non-zero and
- [eq]#pname:subresourceRange::pname:baseArrayLayer {plus}
- pname:subresourceRange::pname:layerCount# must: be less than or equal to
- the pname:arrayLayers specified in slink:VkImageCreateInfo when
- pname:image was created
+ [eq]#pname:subresourceRange.baseArrayLayer {plus}
+ pname:subresourceRange.layerCount# must: be less than or equal to the
+ pname:arrayLayers specified in slink:VkImageCreateInfo when pname:image
+ was created
* [[VUID-VkImageMemoryBarrier-image-01207]]
If pname:image has a depth/stencil format with both depth and stencil
components, then the pname:aspectMask member of pname:subresourceRange
diff --git a/doc/specs/vulkan/chapters/vertexpostproc.txt b/doc/specs/vulkan/chapters/vertexpostproc.txt
index 962a791..c2494fb 100644
--- a/doc/specs/vulkan/chapters/vertexpostproc.txt
+++ b/doc/specs/vulkan/chapters/vertexpostproc.txt
@@ -494,6 +494,13 @@ include::../api/structs/VkPipelineViewportStateCreateInfo.txt[]
sname:VkPhysicalDeviceLimits::pname:maxViewports, inclusive
* [[VUID-VkPipelineViewportStateCreateInfo-scissorCount-01220]]
pname:scissorCount and pname:viewportCount must: be identical
+ifdef::VK_NV_clip_space_w_scaling[]
+ * If the pname:viewportWScalingEnable member of a
+ slink:VkPipelineViewportWScalingStateCreateInfoNV structure chained to
+ the pname:pNext chain is ename:VK_TRUE, the pname:viewportCount member
+ of the slink:VkPipelineViewportWScalingStateCreateInfoNV structure must:
+ be equal to pname:viewportCount
+endif::VK_NV_clip_space_w_scaling[]
****
include::../validity/structs/VkPipelineViewportStateCreateInfo.txt[]
@@ -607,8 +614,8 @@ replace the current state for the viewport index [eq]#pname:firstViewport
If the <<features-features-multiViewport,multiple viewports>> feature is
not enabled, pname:viewportCount must: be `1`
* [[VUID-vkCmdSetViewport-pViewports-01226]]
- pname:pViewports must: be a pointer to an array of pname:viewportCount
- valid sname:VkViewport structures
+ pname:pViewports must: be a valid pointer to an array of
+ pname:viewportCount valid sname:VkViewport structures
****
include::../validity/protos/vkCmdSetViewport.txt[]
diff --git a/src/spec/validitygenerator.py b/src/spec/validitygenerator.py
index aefdb08..6908123 100644
--- a/src/spec/validitygenerator.py
+++ b/src/spec/validitygenerator.py
@@ -348,9 +348,9 @@ class ValidityOutputGenerator(OutputGenerator):
if (lengths[0]) == 'null-terminated':
asciidoc += 'a null-terminated '
elif (lengths[0]) == '1':
- asciidoc += 'a pointer to '
+ asciidoc += 'a valid pointer to '
else:
- asciidoc += 'a pointer to an array of '
+ asciidoc += 'a valid pointer to an array of '
# Handle equations, which are currently denoted with latex
if 'latexmath:' in lengths[0]:
@@ -363,9 +363,9 @@ class ValidityOutputGenerator(OutputGenerator):
if (length) == 'null-terminated': # This should always be the last thing. If it ever isn't for some bizarre reason, then this will need some massaging.
asciidoc += 'null-terminated '
elif (length) == '1':
- asciidoc += 'pointers to '
+ asciidoc += 'valid pointers to '
else:
- asciidoc += 'pointers to arrays of '
+ asciidoc += 'valid pointers to arrays of '
# Handle equations, which are currently denoted with latex
if 'latexmath:' in length:
asciidoc += length
@@ -416,7 +416,7 @@ class ValidityOutputGenerator(OutputGenerator):
# Could be multi-level pointers (e.g. ppData - pointer to a pointer). Handle that.
asciidoc += 'a '
for i in range(0, pointercount):
- asciidoc += 'pointer to a '
+ asciidoc += 'valid pointer to a '
# Handle void* and pointers to it
if paramtype.text == 'void':