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
Change log for April 22, 2016 Vulkan 1.0.11 spec update: * Bump API patch number and header version number to 11 for this update. Github Issues: * Clarify the WSI extension language by switching from the fuzzier "ownership" language to more-consistent "acquire" language (public issue 117). * Clarify that memory barriers apply to all commands in the dependency chains in the flink:vkGetRenderAreaGranularity command and the <<synchronization-execution-and-memory-dependencies,Execution And Memory Dependencies>> section (public issue 132). * Clarify that a queue family is a set of queues in the <<fundamentals-execmodel,Execution Model>> section (public issue 166). * Removed requirement from valid usage language that VkPresentInfoKHR::waitSemaphoreCount must be greater than 0 (public issue 171). * Fix broken internal links, describe structures consistently, use consistent style for SPIR-V codewords, and tag normative terms that were missing asciidoc tags (public issue 183 and ancillary markup/normative language fixes). * Fix typos for slink:VkPhysicalDeviceLimits member names in slink:VkImageCreateInfo validity language (public issue 184). Internal Issues: * Document that the requested patch version number specified as part of slink:VkApplicationInfo::pname:apiVersion is ignored when creating an instance (internal issue 176). * Clarify handling of extension structs in the <<fundamentals-validusageValid Usage>> section (internal issue 254). * Update required slink:VkImageFormatProperties::pname:maxMipLevels to be limited to the maximum allowed mipmap pyramid size corresponding to the actual maximum supported size for the format (internal issue 256). * Modify the <<features-extentperimagetype,Allowed Extent Values Based On Image Type>> section so the allowed maximum extent is the maximum image dimension supported for each dimension of the type of texture being queried (internal issue 257). * Clarify in the <<spirvenv-module-validation,Validation Rules within a Module>> section that at least one of the code:LocalSize execution mode or code:WorkgroupSize decoration is required for each compute shader entry point in a shader module (internal issue 279). * Add validity rules for formats in flink:vkCmdClearColorImage and flink:vkCmdClearDepthStencilImage (internal issue 283). * Clarify that slink:VkImageFormatProperties::pname:maxResourceSize is an upper bound, and that it may not be possible to create an image anywhere near that size (internal issue 284). Other Commits: * Fix various minor markup errors reported by validation scripts. * Change copyright from Khronos Free Use License to Apache 2.0 license on relevant script/XML/header files. This does not affect the specification source copyright.
2016-04-21 08:08:38 +00:00
in this case, pname:aspectMask is used to select which to query. It is not legal to include more than
2016-02-16 09:53:44 +00:00
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[]