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

100 lines
3.9 KiB
Plaintext
Raw Normal View History

2016-02-16 09:53:44 +00:00
vkGetImageSparseMemoryRequirements(3)
=====================================
Name
----
vkGetImageSparseMemoryRequirements - Query the memory requirements for a sparse image.
C Specification
---------------
include::../protos/vkGetImageSparseMemoryRequirements.txt[]
Parameters
----------
pname:device::
A handle to the device that owns the image being queried.
pname:image::
A handle to the image to be queried.
pname:pSparseMemoryRequirementCount::
On input, a pointer to a variable containing the number of elements in the array pointed to
by pname:pSparseMemoryRequirements. On output, this variable is overwritten with the number
of elements written into pname:pSparseMemoryRequirements.
pname:pSparseMemoryRequirements::
A pointer to an array of structures that will be filled with the requested information.
Description
-----------
fname:vkGetImageSparseMemoryRequirements queries the device specified in pname:device for
the memory requirements of the sparse image specified in pname:image, which must be a
handle to a sparse image.
pname:pSparseMemoryRequirementCount is a pointer to a variable which, on input to the
command contains the number of elements in the array pointed to by
pname:pSparseMemoryRequirements. This is an array of slink:VkSparseImageMemoryRequirements
structures, the definition of which is:
include::../structs/VkSparseImageMemoryRequirements.txt[]
Within slink:VkSparseImageMemoryRequirements, the pname:formatProperties member is an
instance of the slink:VkSparseImageFormatProperties structure, the definition of
which is:
include::../structs/VkSparseImageFormatProperties.txt[]
The pname:aspectMask member of slink:VkSparseImageFormatProperties specifies the image
aspect or aspects to which the remainder of the properties apply. This is a bitfield
made up from members of the elink:VkImageAspectFlagBits enumeration, the definition
of which is:
include::../enums/VkImageAspectFlagBits.txt[]
For each unique aspect of the image, an instance of slink:VkSparseImageFormatProperties is
returned. The pname:imageGranularity member specifies the size, in texels, of the
smallest region that may be uniquely bound within the image specified by pname:image.
Binding is affected by calling flink:vkQueueBindSparse.
It is an instance of the slink:VkExtent3D structure which contains the size of the
sparse binding regions, expressed in texels.
The pname:flags member is a bitfield made up from members of the elink:VkSparseImageFormatFlagBits
enumeration and describes additional requirements for sparse memory binding. The
definition of which is:
include::../enums/VkSparseImageFormatFlagBits.txt[]
The meanings of each of the flags is as follows:
If ename:VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT is set, the image combines mulitple levels
at the tail of the mip chain into a single residency state for array textures. Otherwise,
mip tail is individually addressable for each array layer.
If ename:VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT is set, then each mip level outside the
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
tail has dimensions that are integer multiples of the sparse image block dimensions.
2016-02-16 09:53:44 +00:00
Change log for March 25, 2016 Vulkan 1.0.7 spec update: * Bump API patch number and header version number to 7 for this update. Github Issues: * Fix slink:VkSpecializationMapEntry example to avoid C/C++ strict aliasing issues (public issue 14). * Clarify the meaning of "matching" in flink:vkCmdBindDescriptorSets validity language (public issue 33). * Add stub reference pages so xrefs to not-yet-written pages don't generate 404 errors. However, the actual content of these pages still needs to be filled in as time allows (public issue 44, but does not close that issue out). * Remove incorrect validity statement for flink:vkGetImageSparseMemoryRequirements (public issue 85). * Reword the <<features-limits-bufferImageGranularity,bufferImageGranularity>> feature in terms of "aliasing", and clarify that it applies to bindings in the same memory object (public issue 90). * Clarify the relationship of the slink:VkPhysicalDeviceLimits pname:maxViewportDimensions and pname:viewportBoundsRange limits (public issue 92). * Specify sparse unbound texture replacement in the <<textures-texel-replacement,Texel Replacement>> section independently of robust buffer access language (public issue 100). * Add the <<fundamentals-architecture-model,Architecture Model>> section to explain architecture constraints Vulkan has chosen to accept in order to enable portable and performant code (public issue 122). * State that an object must not be destroyed until *all* (not *any*) uses of that object have completed (public issue 123). * Minor editorial cleanup (public issues 129, 134, 146, 148). * Add validity language for layer and extension names to slink:VkDeviceCreateInfo matching that used for slink:VkInstanceCreateInfo (public issue 130). * Clean up terminology for the case when the bits set in one bitmask are a subset of the bits set in another bitmask (public issue 138). * Document that input attachments are UniformConstant not Input, in the <<interfaces-inputattachment,Fragment Input Attachment Interface>> section (public glslang bug 169). Internal Issues: * Add max enum values to "flag bits" enums (internal issue #136). * Clarify language around the various uses of the term "block" in the <<appendix-compressedtex-bc,Block Compressed Image Formats>> section (internal issue #202). * Removed "expand" dependency from <enums> groups in vk.xml and added auto-generation code in the scripts to infer it instead, to ensure consistency. This caused renaming of sname:VkColorSpaceKHR and sname:VkPresentModeKHR etext:BEGIN_RANGE (etc.) tokens, but those tokens are metadata, not part of the API, and the Vulkan WG is OK with this change. This change adds ranges to two additional enums that were missing them due to not defining the "expand" attribute (internal issue 217). * Tweak makefile to generate ref page nroff (.3) files in the right output directory, working around an a2x limitation (internal issue 223). Other Commits: * Add validity requirements for flink:vkCmdCopyQueryPoolResults pname:dstBuffer parameter. * Fix ref page build to generate .3 targets in the right output directory.
2016-03-25 09:25:04 +00:00
If ename:VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT is set, then the format has non-standard
sparse image block dimensions and the members of the pname:imageGranularity do not match the
standard sparse image block dimensions for the format.
2016-02-16 09:53:44 +00:00
The pname:imageMipTailStartLod member of the slink:VkSparseImageMemoryRequirements structure
contains the level-of-detail at which the mip tail begins for the image specified in
pname:image.
pname:imageMipTailSize contains the size of the mip tail, pname:imageMipTailOffset
contains its offset, and pname:imageMipTailStride contains the stride between layers in the
tail for array textures. All three members are expressed in bytes.
include::../validity/protos/vkGetImageSparseMemoryRequirements.txt[]
See Also
--------
flink:vkQueueBindSparse, flink:vkGetImageMemoryRequirements
include::footer.txt[]