C Specification
The VkSparseMemoryBind structure is defined as:
typedef struct VkSparseMemoryBind {
VkDeviceSize resourceOffset;
VkDeviceSize size;
VkDeviceMemory memory;
VkDeviceSize memoryOffset;
VkSparseMemoryBindFlags flags;
} VkSparseMemoryBind;
Members
-
resourceOffsetis the offset into the resource. -
sizeis the size of the memory region to be bound. -
memoryis the VkDeviceMemory object that the range of the resource is bound to. Ifmemoryis VK_NULL_HANDLE, the range is unbound. -
memoryOffsetis the offset into the VkDeviceMemory object to bind the resource range to. Ifmemoryis VK_NULL_HANDLE, this value is ignored. -
flagsis a bitmask of VkSparseMemoryBindFlagBits specifying usage of the binding operation.
Description
The binding range [resourceOffset, resourceOffset +
size) has different constraints based on flags.
If flags contains 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:
-
metadataRegion = [base, base +
imageMipTailSize) -
base =
imageMipTailOffset+imageMipTailStride× n
and imageMipTailOffset, imageMipTailSize, and
imageMipTailStride values are from the
VkSparseImageMemoryRequirements corresponding to the metadata aspect
of the image, and n is a valid array layer index for the image,
imageMipTailStride is considered to be zero for aspects where
VkSparseImageMemoryRequirements::formatProperties.flags contains
VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT.
If flags does not contain VK_SPARSE_MEMORY_BIND_METADATA_BIT,
the binding range must be within the range
[0,VkMemoryRequirements::size).
See Also
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.