vkCreateImage
To create images, call:
VkResult vkCreateImage(
VkDevice device,
const VkImageCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkImage* pImage);
deviceis the logical device that creates the image.pCreateInfois a pointer to a VkImageCreateInfo structure containing parameters to be used to create the image.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pImageis a pointer to a VkImage handle in which the resulting image object is returned.
Valid Usage
VUID-vkCreateImage-device-09666
`device` :normative{type="must"} support at least one queue family with one of the
`VK_QUEUE_VIDEO_ENCODE_BIT_KHR`,
`VK_QUEUE_VIDEO_DECODE_BIT_KHR`,
`VK_QUEUE_OPTICAL_FLOW_BIT_NV`,
VK_QUEUE_SPARSE_BINDING_BIT,
VK_QUEUE_TRANSFER_BIT, VK_QUEUE_COMPUTE_BIT, or
VK_QUEUE_GRAPHICS_BIT capabilities
VUID-vkCreateImage-flags-00939
If the flags member of pCreateInfo includes
VK_IMAGE_CREATE_SPARSE_BINDING_BIT,
and the extendedSparseAddressSpace feature is not enabled,
creating this VkImage must not cause the total required sparse
memory for all currently valid sparse resources on the device to exceed
VkPhysicalDeviceLimits::sparseAddressSpaceSize
VUID-vkCreateImage-flags-09385
If the flags member of pCreateInfo includes
VK_IMAGE_CREATE_SPARSE_BINDING_BIT, the
extendedSparseAddressSpace feature is enabled, and the
usage member of pCreateInfo contains bits not in
VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseImageUsageFlags,
creating this VkImage must not cause the total required sparse
memory for all currently valid sparse resources on the device, excluding
VkBuffer created with usage member of pCreateInfo
containing bits in
VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseBufferUsageFlags
and VkImage created with usage member of pCreateInfo
containing bits in
VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseImageUsageFlags,
to exceed VkPhysicalDeviceLimits::sparseAddressSpaceSize
VUID-vkCreateImage-flags-09386
If the flags member of pCreateInfo includes
VK_IMAGE_CREATE_SPARSE_BINDING_BIT and the
extendedSparseAddressSpace feature is enabled, creating this
VkImage must not cause the total required sparse memory for all
currently valid sparse resources on the device to exceed
VkPhysicalDeviceExtendedSparseAddressSpacePropertiesNV::extendedSparseAddressSpaceSize
VUID-vkCreateImage-pNext-06389
If a VkBufferCollectionImageCreateInfoFUCHSIA has been chained to
pNext, pCreateInfo must match the
Sysmem chosen VkImageCreateInfo
excepting members VkImageCreateInfo::extent and
VkImageCreateInfo::usage in the match criteria
Valid Usage (Implicit)
VUID-vkCreateImage-device-parameter
device must be a valid VkDevice handle
VUID-vkCreateImage-pCreateInfo-parameter
pCreateInfo must be a valid pointer to a valid VkImageCreateInfo structure
VUID-vkCreateImage-pAllocator-parameter
If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
VUID-vkCreateImage-pImage-parameter
pImage must be a valid pointer to a VkImage handle