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
-
sTypeis the type of this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
imageis the image to be attached to memory. -
memoryis a VkDeviceMemory object describing the device memory to attach. -
memoryOffsetis the start offset of the region ofmemorywhich is to be bound to the image. The number of bytes returned in theVkMemoryRequirements::sizemember inmemory, starting frommemoryOffsetbytes, will be bound to the specified image.
Description
-
VUID-VkBindImageMemoryInfo-image-07460
imagemust not have been bound to a memory object -
VUID-VkBindImageMemoryInfo-image-01045
imagemust not have been created with any sparse memory binding flags -
VUID-VkBindImageMemoryInfo-memoryOffset-01046
memoryOffsetmust be less than the size ofmemory -
VUID-VkBindImageMemoryInfo-image-01445
Ifimagerequires a dedicated allocation (as reported by vkGetImageMemoryRequirements2 in VkMemoryDedicatedRequirements::requiresDedicatedAllocationforimage),memorymust have been created with VkMemoryDedicatedAllocateInfo::imageequal toimage -
VUID-VkBindImageMemoryInfo-memory-02628
If thededicatedAllocationImageAliasingfeature is not enabled, and theVkMemoryAllocateInfoprovided whenmemorywas allocated included a VkMemoryDedicatedAllocateInfo structure in itspNextchain, and VkMemoryDedicatedAllocateInfo::imagewas not VK_NULL_HANDLE, thenimagemust equal VkMemoryDedicatedAllocateInfo::imageandmemoryOffsetmust be zero -
VUID-VkBindImageMemoryInfo-memory-02629
If thededicatedAllocationImageAliasingfeature is enabled, and theVkMemoryAllocateInfoprovided whenmemorywas allocated included a VkMemoryDedicatedAllocateInfo structure in itspNextchain, and VkMemoryDedicatedAllocateInfo::imagewas not VK_NULL_HANDLE, thenmemoryOffsetmust be zero, andimagemust be either equal to VkMemoryDedicatedAllocateInfo::imageor an image that was created using the same parameters in VkImageCreateInfo, with the exception thatextentandarrayLayersmay differ subject to the following restrictions: every dimension in theextentparameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and thearrayLayersparameter 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_BITbit 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_BITbit 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
Ifimagewas created with VkDedicatedAllocationImageCreateInfoNV::dedicatedAllocationequal toVK_TRUE,memorymust have been created with VkDedicatedAllocationMemoryAllocateInfoNV::imageequal to an image handle created with identical creation parameters toimageandmemoryOffsetmust be zero -
VUID-VkBindImageMemoryInfo-memory-02728
If the value of VkExportMemoryAllocateInfo::handleTypesused to allocatememoryis not0, it must include at least one of the handles set in VkExternalMemoryImageCreateInfo::handleTypeswhenimagewas created -
VUID-VkBindImageMemoryInfo-memory-02989
Ifmemorywas created by a memory import operation, that is not VkImportAndroidHardwareBufferInfoANDROID with a non-NULLbuffervalue, the external handle type of the imported memory must also have been set in VkExternalMemoryImageCreateInfo::handleTypeswhenimagewas created -
VUID-VkBindImageMemoryInfo-memory-02990
Ifmemorywas created with the VkImportAndroidHardwareBufferInfoANDROID memory import operation with a non-NULLbuffervalue,VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROIDmust also have been set in VkExternalMemoryImageCreateInfo::handleTypeswhenimagewas created -
VUID-VkBindImageMemoryInfo-descriptorBufferCaptureReplay-08113
If the VkPhysicalDeviceDescriptorBufferFeaturesEXT ::descriptorBufferCaptureReplayfeature is enabled andimagewas created with theVK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXTbit set,memorymust have been allocated with theVK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BITbit set -
VUID-VkBindImageMemoryInfo-pNext-01615
If thepNextchain does not include a VkBindImagePlaneMemoryInfo structure,memorymust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimage -
VUID-VkBindImageMemoryInfo-pNext-01616
If thepNextchain does not include a VkBindImagePlaneMemoryInfo structure,memoryOffsetmust be an integer multiple of thealignmentmember of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimage -
VUID-VkBindImageMemoryInfo-pNext-01617
If thepNextchain does not include a VkBindImagePlaneMemoryInfo structure, the difference of the size ofmemoryandmemoryOffsetmust be greater than or equal to thesizemember of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with the sameimage -
VUID-VkBindImageMemoryInfo-pNext-01618
If thepNextchain includes a VkBindImagePlaneMemoryInfo structure,imagemust have been created with theVK_IMAGE_CREATE_DISJOINT_BITbit set -
VUID-VkBindImageMemoryInfo-pNext-01619
If thepNextchain includes a VkBindImagePlaneMemoryInfo structure,memorymust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimageand where VkBindImagePlaneMemoryInfo::planeAspectcorresponds to the VkImagePlaneMemoryRequirementsInfo::planeAspectin the VkImageMemoryRequirementsInfo2 structure’spNextchain -
VUID-VkBindImageMemoryInfo-pNext-01620
If thepNextchain includes a VkBindImagePlaneMemoryInfo structure,memoryOffsetmust be an integer multiple of thealignmentmember of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 withimageand where VkBindImagePlaneMemoryInfo::planeAspectcorresponds to the VkImagePlaneMemoryRequirementsInfo::planeAspectin the VkImageMemoryRequirementsInfo2 structure’spNextchain -
VUID-VkBindImageMemoryInfo-pNext-01621
If thepNextchain includes a VkBindImagePlaneMemoryInfo structure, the difference of the size ofmemoryandmemoryOffsetmust be greater than or equal to thesizemember of the VkMemoryRequirements structure returned from a call to vkGetImageMemoryRequirements2 with the sameimageand where VkBindImagePlaneMemoryInfo::planeAspectcorresponds to the VkImagePlaneMemoryRequirementsInfo::planeAspectin the VkImageMemoryRequirementsInfo2 structure’spNextchain -
VUID-VkBindImageMemoryInfo-pNext-01626
If thepNextchain includes a VkBindImageMemoryDeviceGroupInfo structure, all instances ofmemoryspecified by VkBindImageMemoryDeviceGroupInfo::pDeviceIndicesmust have been allocated -
VUID-VkBindImageMemoryInfo-pNext-01627
If thepNextchain includes a VkBindImageMemoryDeviceGroupInfo structure, and VkBindImageMemoryDeviceGroupInfo::splitInstanceBindRegionCountis not zero, thenimagemust have been created with theVK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BITbit set -
VUID-VkBindImageMemoryInfo-pNext-01628
If thepNextchain includes a VkBindImageMemoryDeviceGroupInfo structure, all elements of VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegionsmust be valid rectangles contained within the dimensions ofimage -
VUID-VkBindImageMemoryInfo-pNext-01629
If thepNextchain includes a VkBindImageMemoryDeviceGroupInfo structure, the union of the areas of all elements of VkBindImageMemoryDeviceGroupInfo::pSplitInstanceBindRegionsthat correspond to the same instance ofimagemust cover the entire image -
VUID-VkBindImageMemoryInfo-image-01630
Ifimagewas created with a valid swapchain handle in VkImageSwapchainCreateInfoKHR::swapchain, then thepNextchain must include a VkBindImageMemorySwapchainInfoKHR structure containing the same swapchain handle -
VUID-VkBindImageMemoryInfo-pNext-01631
If thepNextchain includes a VkBindImageMemorySwapchainInfoKHR structure,memorymust be VK_NULL_HANDLE -
VUID-VkBindImageMemoryInfo-pNext-01632
If thepNextchain does not include a VkBindImageMemorySwapchainInfoKHR structure,memorymust be a valid VkDeviceMemory handle
-
VUID-VkBindImageMemoryInfo-sType-sType
sTypemust beVK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO -
VUID-VkBindImageMemoryInfo-pNext-pNext
EachpNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance of VkBindImageMemoryDeviceGroupInfo, VkBindImageMemorySwapchainInfoKHR, or VkBindImagePlaneMemoryInfo -
VUID-VkBindImageMemoryInfo-sType-unique
ThesTypevalue of each struct in thepNextchain must be unique -
VUID-VkBindImageMemoryInfo-image-parameter
imagemust be a valid VkImage handle -
VUID-VkBindImageMemoryInfo-commonparent
Both ofimage, andmemorythat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice
See Also
VK_VERSION_1_1, VkDeviceMemory, VkDeviceSize, VkImage, VkStructureType, vkBindImageMemory2, vkBindImageMemory2KHR
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.