vkGetImageSubresourceLayout2EXT(3)

# vkGetImageSubresourceLayout2EXT(3) Manual Page

## Name

vkGetImageSubresourceLayout2EXT - Retrieve information about an image subresource

Loading… please wait.

## C Specification

To query the memory layout of an image subresource, call:

    // Provided by VK_EXT_image_compression_control
    void vkGetImageSubresourceLayout2EXT(
        VkDevice                                    device,
        VkImage                                     image,
        const VkImageSubresource2EXT*               pSubresource,
        VkSubresourceLayout2EXT*                    pLayout);

## Parameters

- `device` is the logical device that owns the image.

- `image` is the image whose layout is being queried.

- `pSubresource` is a pointer to a VkImageSubresource2EXT structure selecting a specific image for the image subresource.

- `pLayout` is a pointer to a VkSubresourceLayout2EXT structure in which the layout is returned.

## Description

`vkGetImageSubresourceLayout2EXT` behaves similarly to vkGetImageSubresourceLayout, with the ability to specify extended inputs via chained input structures, and to return extended information via chained output structures.

Valid Usage

- VUID-vkGetImageSubresourceLayout2EXT-image-02270
  `image` must have been created with `tiling` equal to `VK_IMAGE_TILING_LINEAR` or `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`

- VUID-vkGetImageSubresourceLayout2EXT-aspectMask-00997
  The `aspectMask` member of `pSubresource` must only have a single bit set

- VUID-vkGetImageSubresourceLayout2EXT-mipLevel-01716
  The `mipLevel` member of `pSubresource` must be less than the `mipLevels` specified in VkImageCreateInfo when `image` was created

- VUID-vkGetImageSubresourceLayout2EXT-arrayLayer-01717
  The `arrayLayer` member of `pSubresource` must be less than the `arrayLayers` specified in VkImageCreateInfo when `image` was created

- VUID-vkGetImageSubresourceLayout2EXT-format-04461
  If `format` is a color format, the `aspectMask` member of `pSubresource` must be `VK_IMAGE_ASPECT_COLOR_BIT`

- VUID-vkGetImageSubresourceLayout2EXT-format-04462
  If `format` has a depth component, the `aspectMask` member of `pSubresource` must contain `VK_IMAGE_ASPECT_DEPTH_BIT`

- VUID-vkGetImageSubresourceLayout2EXT-format-04463
  If `format` has a stencil component, the `aspectMask` member of `pSubresource` must contain `VK_IMAGE_ASPECT_STENCIL_BIT`

- VUID-vkGetImageSubresourceLayout2EXT-format-04464
  If `format` 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-vkGetImageSubresourceLayout2EXT-format-01581
  If the `tiling` of the `image` is `VK_IMAGE_TILING_LINEAR` and its `format` is a multi-planar format with two planes, the `aspectMask` member of `pSubresource` must be `VK_IMAGE_ASPECT_PLANE_0_BIT` or `VK_IMAGE_ASPECT_PLANE_1_BIT`

- VUID-vkGetImageSubresourceLayout2EXT-format-01582
  If the `tiling` of the `image` is `VK_IMAGE_TILING_LINEAR` and its `format` is a multi-planar format with three planes, the `aspectMask` member of `pSubresource` must be `VK_IMAGE_ASPECT_PLANE_0_BIT`, `VK_IMAGE_ASPECT_PLANE_1_BIT` or `VK_IMAGE_ASPECT_PLANE_2_BIT`

- VUID-vkGetImageSubresourceLayout2EXT-image-01895
  If `image` was created with the `VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID` external memory handle type, then `image` must be bound to memory

- VUID-vkGetImageSubresourceLayout2EXT-tiling-02271
  If the `tiling` of the `image` is `VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT`, then the `aspectMask` member of `pSubresource` must be `VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT` and the index i must be less than the VkDrmFormatModifierPropertiesEXT::`drmFormatModifierPlaneCount` associated with the image’s `format` and VkImageDrmFormatModifierPropertiesEXT::`drmFormatModifier`

Valid Usage (Implicit)

- VUID-vkGetImageSubresourceLayout2EXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetImageSubresourceLayout2EXT-image-parameter
  `image` must be a valid VkImage handle

- VUID-vkGetImageSubresourceLayout2EXT-pSubresource-parameter
  `pSubresource` must be a valid pointer to a valid VkImageSubresource2EXT structure

- VUID-vkGetImageSubresourceLayout2EXT-pLayout-parameter
  `pLayout` must be a valid pointer to a VkSubresourceLayout2EXT structure

- VUID-vkGetImageSubresourceLayout2EXT-image-parent
  `image` must have been created, allocated, or retrieved from `device`

## See Also

VK_EXT_image_compression_control, VkDevice, VkImage, VkImageSubresource2EXT, VkSubresourceLayout2EXT

## 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.

## Copyright

Copyright 2014-2022 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0