vkGetImageSubresourceLayout(3) =============================== Name ---- vkGetImageSubresourceLayout - Retrieve information about an image subresource. C Specification --------------- include::../protos/vkGetImageSubresourceLayout.txt[] Parameters ---------- pname:device:: A handle to the device that owns the image. pname:image:: A handle to the image about which to retrieve information. pname:pSubresource:: A pointer to a structure describing the image subresource. pname:pLayout:: A pointer to a structure that will receive information about the image subresource. Description ----------- fname:vkGetImageSubresourceLayout returns information about the memory layout of an image subresource of an image. pname:device is a handle to the device that owns pname:image, which is the image about which to retrieve information. A description of the image subresource is passsed to the command through an instance of the slink:VkImageSubresource structure, the address of which is passed in pname:pSubresource. The definition of slink:VkImageSubresource is: include::../structs/VkImageSubresource.txt[] Within the pname:pSubresource structure, pname:aspectMask is a bitfield describing the aspect of the image and is made up of a single member of the elink:VkImageAspectFlagBits enumeration, the definition of which is: include::../enums/VkImageAspectFlagBits.txt[] The ename:VK_IMAGE_ASPECT_COLOR_BIT aspect is valid only for image formats that are usable as color. The ename:VK_IMAGE_ASPECT_DEPTH_BIT aspect is valid for formats containing depth information and the ename:VK_IMAGE_ASPECT_STENCIL_BIT aspect is valid only for formats containing stencil information. Note that some formats contain both depth and stencil information, and in this case, pname:aspectMask is used to select which to query. It is not legal to include more than one member of elink:VkImageAspectFlagBits in pname:aspectMask. Some formats also include metadata which may be implementation dependent but is queryable by specifying ename:VK_IMAGE_ASPECT_METADATA_BIT. For resources that have mipmaps or are multiple array layers, the pname:mipLevel and pname:arrayLayer members describe the mipmap level and array layer, respectively. For resources that do not have mipmaps or are not layered, pname:mipLevel and pname:arrayLayer, respectively, should be set to zero. Information about the selected sub-resource is returned to the caller in the instance of the slink:VkSubresourceLayout structure pointed to by pname:pLayout. The definition of slink:VkSubresourceLayout is: include::../structs/VkSubresourceLayout.txt[] The pname:offset member of the pname:pLayout structure is filled with the relative offset of the start of the sub-resource from the start of the parent resource's memory binding. The pname:size member is the size of the sub-resource in memory. The pname:rowPitch specifies the distance in memory of the start of each texel row of the sub-resource from the start of the previous row. The pname:depthPitch specififes the distance in memory of the start of each slice of the sub-resource relative to the start of the previous slice. For one-dimensional resources, pname:rowPitch is zero, and for one- and two-dimensional resources, pname:depthPitch is zero. All four parameters are specified in bytes. include::../validity/protos/vkGetImageSubresourceLayout.txt[] See Also -------- flink:vkGetPhysicalDeviceImageFormatProperties include::footer.txt[]