C Specification

To query the host access layout of an image subresource, for an image created with linear tiling, call:

void vkGetImageSubresourceLayout(
    VkDevice                                    device,
    VkImage                                     image,
    const VkImageSubresource*                   pSubresource,
    VkSubresourceLayout*                        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 VkImageSubresource structure selecting a specific image for the image subresource.

  • pLayout points to a VkSubresourceLayout structure in which the layout is returned.

Description

vkGetImageSubresourceLayout is invariant for the lifetime of a single image.

Valid Usage
  • image must have been created with tiling equal to VK_IMAGE_TILING_LINEAR

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

  • The mipLevel member of pSubresource must be less than the mipLevels specified in VkImageCreateInfo when image was created

  • The arrayLayer member of pSubresource must be less than the arrayLayers specified in VkImageCreateInfo when image was created

Valid Usage (Implicit)
  • device must be a valid VkDevice handle

  • image must be a valid VkImage handle

  • pSubresource must be a valid pointer to a valid VkImageSubresource structure

  • pLayout must be a valid pointer to a VkSubresourceLayout structure

  • image must have been created, allocated, or retrieved from device

See Also

Document Notes

For more information, see the Vulkan Specification at URL

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright (c) 2014-2017 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.