VkDeviceImageSubresourceInfoKHR(3)

# VkDeviceImageSubresourceInfoKHR(3) Manual Page

## Name

VkDeviceImageSubresourceInfoKHR - Image creation information for querying subresource layout

Loading… please wait.

## C Specification

The `VkDeviceImageSubresourceInfoKHR` structure is defined as:

    // Provided by VK_KHR_maintenance5
    typedef struct VkDeviceImageSubresourceInfoKHR {
        VkStructureType                  sType;
        const void*                      pNext;
        const VkImageCreateInfo*         pCreateInfo;
        const VkImageSubresource2KHR*    pSubresource;
    } VkDeviceImageSubresourceInfoKHR;

## Members

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

## Description

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-pNext-pNext
  `pNext` must be `NULL`

- 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

## See Also

VK_KHR_maintenance5, VkImageCreateInfo, VkImageSubresource2KHR, VkStructureType, vkGetDeviceImageSubresourceLayoutKHR

## 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-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0