C Specification
VkBindImageMemoryInfo
contains members corresponding to the parameters
of vkBindImageMemory.
The VkBindImageMemoryInfo
structure is defined as:
// Provided by VK_VERSION_1_1
typedef struct VkBindImageMemoryInfo {
VkStructureType sType;
const void* pNext;
VkImage image;
VkDeviceMemory memory;
VkDeviceSize memoryOffset;
} VkBindImageMemoryInfo;
or the equivalent
// Provided by VK_KHR_bind_memory2
typedef VkBindImageMemoryInfo VkBindImageMemoryInfoKHR;
Members
-
sType
is a VkStructureType value identifying this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
image
is the image to be attached to memory. -
memory
is a VkDeviceMemory object describing the device memory to attach. -
memoryOffset
is the start offset of the region ofmemory
which is to be bound to the image. The number of bytes returned in theVkMemoryRequirements
::size
member inmemory
, starting frommemoryOffset
bytes, will be bound to the specified image.
Description
-
VUID-VkBindImageMemoryInfo-image-07460
image
must not have been bound to a memory object -
VUID-VkBindImageMemoryInfo-image-01045
image
must not have been created with any sparse memory binding flags -
VUID-VkBindImageMemoryInfo-memoryOffset-01046
memoryOffset
must be less than the size ofmemory
-
VUID-VkBindImageMemoryInfo-image-01445
Ifimage
requires a dedicated allocation (as reported by vkGetImageMemoryRequirements2 in VkMemoryDedicatedRequirements::requiresDedicatedAllocation
forimage
),memory
must have been created with VkMemoryDedicatedAllocateInfo::image
equal toimage
-
VUID-VkBindImageMemoryInfo-memory-02628
If thededicatedAllocationImageAliasing
feature is not enabled, and theVkMemoryAllocateInfo
provided whenmemory
was allocated included a VkMemoryDedicatedAllocateInfo structure in itspNext
chain, and VkMemoryDedicatedAllocateInfo::image
was not VK_NULL_HANDLE, thenimage
must equal VkMemoryDedicatedAllocateInfo::image
andmemoryOffset
must be zero -
VUID-VkBindImageMemoryInfo-memory-02629
If thededicatedAllocationImageAliasing
feature is enabled, and theVkMemoryAllocateInfo
provided whenmemory
was allocated included a VkMemoryDedicatedAllocateInfo structure in itspNext
chain, and VkMemoryDedicatedAllocateInfo::image
was not VK_NULL_HANDLE, thenmemoryOffset
must be zero, andimage
must be either equal to VkMemoryDedicatedAllocateInfo::image
or an image that was created using the same parameters in VkImageCreateInfo, with the exception thatextent
andarrayLayers
may differ subject to the following restrictions: every dimension in theextent
parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and thearrayLayers
parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created -
VUID-VkBindImageMemoryInfo-None-01901
If image was created with theVK_IMAGE_CREATE_PROTECTED_BIT
bit set, the image must be bound to a memory object allocated with a memory type that reportsVK_MEMORY_PROPERTY_PROTECTED_BIT
-
VUID-VkBindImageMemoryInfo-None-01902
If image was created with theVK_IMAGE_CREATE_PROTECTED_BIT
bit not set, the image must not be bound to a memory object created with a memory type that reportsVK_MEMORY_PROPERTY_PROTECTED_BIT
-
VUID-VkBindImageMemoryInfo-image-01050
Ifimage
was created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation
equal toVK_TRUE
,memory
must have been created with VkDedicatedAllocationMemoryAllocateInfoNV::image
equal to an image handle created with identical creation parameters toimage
andmemoryOffset
must be zero -
VUID-VkBindImageMemoryInfo-apiVersion-07921
If the VK_KHR_dedicated_allocation extension is not enabled, VkPhysicalDeviceProperties::apiVersion
is less than Vulkan 1.1, andimage
was not created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocation
equal toVK_TRUE
,memory
must not have been allocated dedicated for a specific buffer or image -
VUID-VkBindImageMemoryInfo-memory-02728
If the value of VkExportMemoryAllocateInfo::handleTypes
used to allocatememory
is not0
, it must include at least one of the handles set in VkExternalMemoryImageCreateInfo::handleTypes
whenimage
was created -
VUID-VkBindImageMemoryInfo-memory-02989
Ifmemory
was created by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-NULL
buffer
value, the external handle type of the imported memory must also have been set in VkExternalMemoryImageCreateInfo::handleTypes
whenimage
was created -
VUID-VkBindImageMemoryInfo-memory-02990
Ifmemory
was created with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-NULL
buffer
value,VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
must also have been set in VkExternalMemoryImageCreateInfo::handleTypes
whenimage
was created -
VUID-VkBindImageMemoryInfo-descriptorBufferCaptureReplay-08113
If theimage
was created with theVK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
bit set,memory
must have been allocated with theVK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT
bit set -
VUID-VkBindImageMemoryInfo-image-09202
If theimage
was created with theVK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT
bit set,memory
must have been allocated with theVK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT
bit set -
VUID-VkBindImageMemoryInfo-pNext-01615
If thepNext
chain does not include a VkBindImagePlaneMemoryInfo structure,memory
must have been allocated using one of the memory types allowed in thememoryTypeBits
member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimage
-
VUID-VkBindImageMemoryInfo-pNext-01616
If thepNext
chain does not include a VkBindImagePlaneMemoryInfo structure,memoryOffset
must be an integer multiple of thealignment
member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimage
-
VUID-VkBindImageMemoryInfo-pNext-01617
If thepNext
chain does not include a VkBindImagePlaneMemoryInfo structure, the difference of the size ofmemory
andmemoryOffset
must be greater than or equal to thesize
member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with the sameimage
-
VUID-VkBindImageMemoryInfo-pNext-01618
If thepNext
chain includes a VkBindImagePlaneMemoryInfo structure,image
must have been created with theVK_IMAGE_CREATE_DISJOINT_BIT
bit set -
VUID-VkBindImageMemoryInfo-image-07736
Ifimage
was created with theVK_IMAGE_CREATE_DISJOINT_BIT
bit set, then thepNext
chain must include a VkBindImagePlaneMemoryInfo structure -
VUID-VkBindImageMemoryInfo-pNext-01619
If thepNext
chain includes a VkBindImagePlaneMemoryInfo structure,memory
must have been allocated using one of the memory types allowed in thememoryTypeBits
member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimage
and where VkBindImagePlaneMemoryInfo::planeAspect
corresponds to the VkImagePlaneMemoryRequirementsInfo::planeAspect
in the VkImageMemoryRequirementsInfo2 structure’spNext
chain -
VUID-VkBindImageMemoryInfo-pNext-01620
If thepNext
chain includes a VkBindImagePlaneMemoryInfo structure,memoryOffset
must be an integer multiple of thealignment
member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimage
and where VkBindImagePlaneMemoryInfo::planeAspect
corresponds to the VkImagePlaneMemoryRequirementsInfo::planeAspect
in the VkImageMemoryRequirementsInfo2 structure’spNext
chain -
VUID-VkBindImageMemoryInfo-pNext-01621
If thepNext
chain includes a VkBindImagePlaneMemoryInfo structure, the difference of the size ofmemory
andmemoryOffset
must be greater than or equal to thesize
member of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with the sameimage
and where VkBindImagePlaneMemoryInfo::planeAspect
corresponds to the VkImagePlaneMemoryRequirementsInfo::planeAspect
in the VkImageMemoryRequirementsInfo2 structure’spNext
chain -
VUID-VkBindImageMemoryInfo-pNext-01626
If thepNext
chain includes a VkBindImageMemoryDeviceGroupInfo structure, all instances ofmemory
specified by VkBindImageMemoryDeviceGroupInfo::pDeviceIndices
must have been allocated -
VUID-VkBindImageMemoryInfo-pNext-01627
If thepNext
chain includes a VkBindImageMemoryDeviceGroupInfo structure, and VkBindImageMemoryDeviceGroupInfo::splitInstanceBindRegionCount
is not zero, thenimage
must have been created with theVK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
bit set -
VUID-VkBindImageMemoryInfo-pNext-01628
If thepNext
chain includes a VkBindImageMemoryDeviceGroupInfo structure, all elements of VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegions
must be valid rectangles contained within the dimensions ofimage
-
VUID-VkBindImageMemoryInfo-pNext-01629
If thepNext
chain includes a VkBindImageMemoryDeviceGroupInfo structure, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegions
that correspond to the same instance ofimage
must cover the entire image -
VUID-VkBindImageMemoryInfo-image-01630
Ifimage
was created with a valid swapchain handle in VkImageSwapchainCreateInfoKHR::swapchain
, then thepNext
chain must include a VkBindImageMemorySwapchainInfoKHR structure containing the same swapchain handle -
VUID-VkBindImageMemoryInfo-pNext-01631
If thepNext
chain includes a VkBindImageMemorySwapchainInfoKHR structure,memory
must be VK_NULL_HANDLE -
VUID-VkBindImageMemoryInfo-pNext-01632
If thepNext
chain does not include a VkBindImageMemorySwapchainInfoKHR structure,memory
must be a valid VkDeviceMemory handle
-
VUID-VkBindImageMemoryInfo-sType-sType
sType
must beVK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO
-
VUID-VkBindImageMemoryInfo-pNext-pNext
EachpNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfo, VkBindImageMemorySwapchainInfoKHR, VkBindImagePlaneMemoryInfo, or VkBindMemoryStatusKHR -
VUID-VkBindImageMemoryInfo-sType-unique
ThesType
value of each struct in thepNext
chain must be unique -
VUID-VkBindImageMemoryInfo-image-parameter
image
must be a valid VkImage handle -
VUID-VkBindImageMemoryInfo-commonparent
Both ofimage
, andmemory
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
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.