Vulkan-Docs/doc/specs/vulkan/man/vkGetImageSubresourceLayout...

80 lines
3.4 KiB
Plaintext
Raw Normal View History

2016-02-16 09:53:44 +00:00
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::
Change log for April 15, 2016 Vulkan 1.0.10 spec update: * Bump API patch number and header version number to 10 for this update. Github Issues: * Slightly tweak the <<memory-allocation,Host Memory>> allocator language so that an application wrapping the standard C alloc/free/realloc functions is still correct - the previous language was too strong with regards to freeing memory. Also made certain scenarios clearer - an implementation may now continue without error if an allocation failed and it is able to continue correctly (public issue 21). * Require that etext:VK_*_CREATE_SPARSE_BINDING_BIT is set when the corresponding etext:VK_*_CREATE_SPARSE_RESIDENCY_BIT is used, in the <<sparsememory-miptail,Mip Tail Regions>> section and related commands flink:vkCreateBuffer and flink:vkCreateImage (public issue 84). * Update the <<features,Features, Limits, and Formats>> chapter to clarify interactions between optional features and dynamic state for the pname:depthBiasClamp and pname:wideLines features (public issue 89). * Describe the code:WorkgroupSize builtin in the <<interfaces-builtin-variables,Built-In Variables>> section, and update the <<compute-shaders,Compute Shaders>> section to further clarify how to set the number of workgroups to execute in a compute shader (public issue 145). * Use the term *image subresource* everywhere instead of *subresource*, except for the special case of *host-accessible subresource*, which may be either an image subresource or buffer range (public issue 120) * Add a note to the <<features,Features, Limits, and Formats>> section about extensibility of structures (Public issue 165). * Fix return code flink:vkAcquireNextImageKHR when the timeout parameter is 0 to ename:VK_NOT_READY instead of ename:VK_TIMEOUT (public issue 170). * Fix typo in slink:VkLayerProperties::pname:apiVersion field (public issue 172). Internal Issues: * Fix a few minor internally-detected typos. * Minor formatting tweaks to pseudocode in the <<resources,Resource Creation>> chapter (internal issue 179). * Fix typo in the definition of point sampling for elink:VkCullModeFlagBits (internal issue 268).
2016-04-14 08:58:49 +00:00
A pointer to a structure describing the image subresource.
2016-02-16 09:53:44 +00:00
pname:pLayout::
Change log for April 15, 2016 Vulkan 1.0.10 spec update: * Bump API patch number and header version number to 10 for this update. Github Issues: * Slightly tweak the <<memory-allocation,Host Memory>> allocator language so that an application wrapping the standard C alloc/free/realloc functions is still correct - the previous language was too strong with regards to freeing memory. Also made certain scenarios clearer - an implementation may now continue without error if an allocation failed and it is able to continue correctly (public issue 21). * Require that etext:VK_*_CREATE_SPARSE_BINDING_BIT is set when the corresponding etext:VK_*_CREATE_SPARSE_RESIDENCY_BIT is used, in the <<sparsememory-miptail,Mip Tail Regions>> section and related commands flink:vkCreateBuffer and flink:vkCreateImage (public issue 84). * Update the <<features,Features, Limits, and Formats>> chapter to clarify interactions between optional features and dynamic state for the pname:depthBiasClamp and pname:wideLines features (public issue 89). * Describe the code:WorkgroupSize builtin in the <<interfaces-builtin-variables,Built-In Variables>> section, and update the <<compute-shaders,Compute Shaders>> section to further clarify how to set the number of workgroups to execute in a compute shader (public issue 145). * Use the term *image subresource* everywhere instead of *subresource*, except for the special case of *host-accessible subresource*, which may be either an image subresource or buffer range (public issue 120) * Add a note to the <<features,Features, Limits, and Formats>> section about extensibility of structures (Public issue 165). * Fix return code flink:vkAcquireNextImageKHR when the timeout parameter is 0 to ename:VK_NOT_READY instead of ename:VK_TIMEOUT (public issue 170). * Fix typo in slink:VkLayerProperties::pname:apiVersion field (public issue 172). Internal Issues: * Fix a few minor internally-detected typos. * Minor formatting tweaks to pseudocode in the <<resources,Resource Creation>> chapter (internal issue 179). * Fix typo in the definition of point sampling for elink:VkCullModeFlagBits (internal issue 268).
2016-04-14 08:58:49 +00:00
A pointer to a structure that will receive information about the image
subresource.
2016-02-16 09:53:44 +00:00
Description
-----------
Change log for April 15, 2016 Vulkan 1.0.10 spec update: * Bump API patch number and header version number to 10 for this update. Github Issues: * Slightly tweak the <<memory-allocation,Host Memory>> allocator language so that an application wrapping the standard C alloc/free/realloc functions is still correct - the previous language was too strong with regards to freeing memory. Also made certain scenarios clearer - an implementation may now continue without error if an allocation failed and it is able to continue correctly (public issue 21). * Require that etext:VK_*_CREATE_SPARSE_BINDING_BIT is set when the corresponding etext:VK_*_CREATE_SPARSE_RESIDENCY_BIT is used, in the <<sparsememory-miptail,Mip Tail Regions>> section and related commands flink:vkCreateBuffer and flink:vkCreateImage (public issue 84). * Update the <<features,Features, Limits, and Formats>> chapter to clarify interactions between optional features and dynamic state for the pname:depthBiasClamp and pname:wideLines features (public issue 89). * Describe the code:WorkgroupSize builtin in the <<interfaces-builtin-variables,Built-In Variables>> section, and update the <<compute-shaders,Compute Shaders>> section to further clarify how to set the number of workgroups to execute in a compute shader (public issue 145). * Use the term *image subresource* everywhere instead of *subresource*, except for the special case of *host-accessible subresource*, which may be either an image subresource or buffer range (public issue 120) * Add a note to the <<features,Features, Limits, and Formats>> section about extensibility of structures (Public issue 165). * Fix return code flink:vkAcquireNextImageKHR when the timeout parameter is 0 to ename:VK_NOT_READY instead of ename:VK_TIMEOUT (public issue 170). * Fix typo in slink:VkLayerProperties::pname:apiVersion field (public issue 172). Internal Issues: * Fix a few minor internally-detected typos. * Minor formatting tweaks to pseudocode in the <<resources,Resource Creation>> chapter (internal issue 179). * Fix typo in the definition of point sampling for elink:VkCullModeFlagBits (internal issue 268).
2016-04-14 08:58:49 +00:00
fname:vkGetImageSubresourceLayout returns information about the memory
layout of a 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:
2016-02-16 09:53:44 +00:00
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 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[]