100 lines
3.2 KiB
Plaintext
100 lines
3.2 KiB
Plaintext
// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
VkSparseMemoryBind(3)
|
|
=====================
|
|
|
|
Name
|
|
----
|
|
VkSparseMemoryBind - Structure specifying a sparse memory bind operation
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
// refBegin VkSparseMemoryBind - Structure specifying a sparse memory bind operation
|
|
|
|
The sname:VkSparseMemoryBind structure is defined as:
|
|
|
|
include::../api/structs/VkSparseMemoryBind.txt[]
|
|
|
|
|
|
Members
|
|
-------
|
|
|
|
* pname:resourceOffset is the offset into the resource.
|
|
* pname:size is the size of the memory region to be bound.
|
|
* pname:memory is the sname:VkDeviceMemory object that the range of the
|
|
resource is bound to. If pname:memory is dlink:VK_NULL_HANDLE, the range
|
|
is unbound.
|
|
* pname:memoryOffset is the offset into the sname:VkDeviceMemory object to
|
|
bind the resource range to. If pname:memory is dlink:VK_NULL_HANDLE,
|
|
this value is ignored.
|
|
* pname:flags is a bitmask specifying usage of the binding operation. Bits
|
|
which can: be set include:
|
|
+
|
|
--
|
|
// refBegin VkSparseMemoryBindFlagBits - Bitmask specifying usage of a sparse memory binding operation
|
|
include::../api/enums/VkSparseMemoryBindFlagBits.txt[]
|
|
--
|
|
+
|
|
** ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT indicates that the memory
|
|
being bound is only for the metadata aspect.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
The _binding range_ latexmath:[$[\mathit{resourceOffset},
|
|
\mathit{resourceOffset} + \mathit{size})$] has different constraints based
|
|
on pname:flags. If pname:flags contains
|
|
ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT, the binding range must: be within
|
|
the mip tail region of the metadata aspect. This metadata region is defined
|
|
by:
|
|
|
|
[latexmath]
|
|
++++++++++++++++++++++++++
|
|
\begin{align*}
|
|
\mathit{metadataRegion} = [&
|
|
\mathit{imageMipTailOffset} + \mathit{imageMipTailStride} \times n,\\
|
|
&\mathit{imageMipTailOffset} +
|
|
\mathit{imageMipTailStride} \times n + \mathit{imageMipTailSize})
|
|
\end{align*}
|
|
++++++++++++++++++++++++++
|
|
|
|
Where pname:imageMipTailOffset, pname:imageMipTailSize, and
|
|
pname:imageMipTailStride values are from the
|
|
slink:VkSparseImageMemoryRequirements that correspond to the metadata aspect
|
|
of the image. The term latexmath:[$n$] is a valid array layer index for the
|
|
image.
|
|
|
|
pname:imageMipTailStride is considered to be zero for aspects where
|
|
sname:VkSparseImageMemoryRequirements::pname:formatProperties.flags contains
|
|
ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT.
|
|
|
|
If pname:flags does not contain ename:VK_SPARSE_MEMORY_BIND_METADATA_BIT,
|
|
the binding range must: be within the range
|
|
latexmath:[$[0, {\mathit{VkMemoryRequirements}::\mathit{size}})$].
|
|
|
|
include::../validity/structs/VkSparseMemoryBind.txt[]
|
|
|
|
|
|
See Also
|
|
--------
|
|
|
|
slink:VkDeviceMemory, basetype:VkDeviceSize, slink:VkSparseBufferMemoryBindInfo, slink:VkSparseImageOpaqueMemoryBindInfo, elink:VkSparseMemoryBindFlags
|
|
|
|
|
|
Document Notes
|
|
--------------
|
|
|
|
For more information, see the Vulkan Specification at URL
|
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkSparseMemoryBind
|
|
|
|
This page is extracted from the Vulkan Specification.
|
|
Fixes and changes should be made to the Specification,not directly.
|
|
|
|
include::footer.txt[]
|
|
|