Structures

VkDeviceImageSubresourceInfoKHR

Image creation information for querying subresource layout

The VkDeviceImageSubresourceInfoKHR structure is defined as:

typedef struct VkDeviceImageSubresourceInfoKHR {
    VkStructureType sType;
    const void* pNext;
    const VkImageCreateInfo* pCreateInfo;
    const VkImageSubresource2KHR* pSubresource;
} VkDeviceImageSubresourceInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • pCreateInfo is a pointer to a VkImageCreateInfo structure containing parameters affecting creation of the image to query.
  • pSubresource pSubresource is a pointer to a VkImageSubresource2KHR structure selecting a specific image subresource for the query.

Valid Usage

VUID-VkDeviceImageSubresourceInfoKHR-aspectMask-00997

The aspectMask member of pSubresource must only have a single bit set

VUID-VkDeviceImageSubresourceInfoKHR-mipLevel-01716

The mipLevel member of pSubresource must be less than the mipLevels specified in pCreateInfo

VUID-VkDeviceImageSubresourceInfoKHR-arrayLayer-01717

The arrayLayer member of pSubresource must be less than the arrayLayers specified in pCreateInfo

VUID-VkDeviceImageSubresourceInfoKHR-format-08886

If format of the image is a color format that is not a multi-planar image format, and tiling of the pCreateInfo is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, the aspectMask member of pSubresource must be VK_IMAGE_ASPECT_COLOR_BIT

VUID-VkDeviceImageSubresourceInfoKHR-format-04462

If format of the pCreateInfo has a depth component, the aspectMask member of pSubresource must contain VK_IMAGE_ASPECT_DEPTH_BIT

VUID-VkDeviceImageSubresourceInfoKHR-format-04463

If format of the pCreateInfo has a stencil component, the aspectMask member of pSubresource must contain VK_IMAGE_ASPECT_STENCIL_BIT

VUID-VkDeviceImageSubresourceInfoKHR-format-04464

If format of the pCreateInfo does not contain a stencil or depth component, the aspectMask member of pSubresource must not contain VK_IMAGE_ASPECT_DEPTH_BIT or VK_IMAGE_ASPECT_STENCIL_BIT

VUID-VkDeviceImageSubresourceInfoKHR-tiling-08717

If the tiling of the pCreateInfo is VK_IMAGE_TILING_LINEAR and has a multi-planar image format, then the aspectMask member of pSubresource must be a single valid multi-planar aspect mask bit

Valid Usage (Implicit)

VUID-VkDeviceImageSubresourceInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR

VUID-VkDeviceImageSubresourceInfoKHR-pCreateInfo-parameter

pCreateInfo must be a valid pointer to a valid VkImageCreateInfo structure

VUID-VkDeviceImageSubresourceInfoKHR-pSubresource-parameter

pSubresource must be a valid pointer to a valid VkImageSubresource2KHR structure