C Specification
To attach memory to a VkImage
object created without the
VK_IMAGE_CREATE_DISJOINT_BIT
set, call:
// Provided by VK_VERSION_1_0
VkResult vkBindImageMemory(
VkDevice device,
VkImage image,
VkDeviceMemory memory,
VkDeviceSize memoryOffset);
Parameters
-
device
is the logical device that owns the image and memory. -
image
is the image. -
memory
is the 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
vkBindImageMemory
is equivalent to passing the same parameters through
VkBindImageMemoryInfo to vkBindImageMemory2.
If the memory
is allocated by a memory import operation with
VkExternalMemoryBufferCreateInfo::handleTypes
assigned to
VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCI_BUF_BIT_NV
, the properties of
image
and the memoryoffset
must be compatible with the
attributes used to create NvSciBufObj
, otherwise the implementation
will return VK_ERROR_VALIDATION_FAILED
.
If
VkPhysicalDeviceVulkanSC10Properties::deviceNoDynamicHostAllocations
is VK_TRUE
, vkBindImageMemory
must not return
VK_ERROR_OUT_OF_HOST_MEMORY
.
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.