Vulkan-Docs/doc/specs/vulkan/man/VkBufferImageCopy.txt

105 lines
3.9 KiB
Plaintext

// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
// Creative Commons Attribution 4.0 International License; see
// http://creativecommons.org/licenses/by/4.0/
VkBufferImageCopy(3)
====================
Name
----
VkBufferImageCopy - Structure specifying a buffer image copy operation
C Specification
---------------
// refBegin VkBufferImageCopy - Structure specifying a buffer image copy operation
For both flink:vkCmdCopyBufferToImage and flink:vkCmdCopyImageToBuffer, each
element of pname:pRegions is a structure defined as:
include::../api/structs/VkBufferImageCopy.txt[]
Members
-------
* pname:bufferOffset is the offset in bytes from the start of the
buffer object where the image data is copied from or to.
* pname:bufferRowLength and pname:bufferImageHeight specify the
data in buffer memory as a subregion of a larger two- or
three-dimensional image, and control the addressing calculations of data
in buffer memory. If either of these values is zero, that aspect of the
buffer memory is considered to be tightly packed according to the
pname:imageExtent.
* pname:imageSubresource is a slink:VkImageSubresourceLayers used to
specify the specific image subresources of the image used for the source
or destination image data.
* pname:imageOffset selects the initial x, y, z offsets in texels of the
sub-region of the source or destination image data.
* pname:imageExtent is the size in texels of the image to copy in
pname:width, pname:height and pname:depth. 1D images use only pname:x
and pname:width. 2D images use pname:x, pname:y, pname:width and
pname:height. 3D images use pname:x, pname:y, pname:z, pname:width,
pname:height and pname:depth.
Description
-----------
When copying to or from a depth or stencil aspect, the data in buffer
memory uses a layout that is a (mostly) tightly packed representation of
the depth or stencil data. Specifically:
* data copied to or from the stencil aspect of any depth/stencil format
is tightly packed with one ename:VK_FORMAT_S8_UINT value per texel.
* data copied to or from the depth aspect of a ename:VK_FORMAT_D16_UNORM
or ename:VK_FORMAT_D16_UNORM_S8_UINT format is tightly packed with one
ename:VK_FORMAT_D16_UNORM value per texel.
* data copied to or from the depth aspect of a ename:VK_FORMAT_D32_SFLOAT
or ename:VK_FORMAT_D32_SFLOAT_S8_UINT format is tightly packed with
one ename:VK_FORMAT_D32_SFLOAT value per texel.
* data copied to or from the depth aspect of a
ename:VK_FORMAT_X8_D24_UNORM_PACK32 or
ename:VK_FORMAT_D24_UNORM_S8_UINT format is packed with one 32-bit word
per texel with the D24 value in the LSBs of the word, and undefined
values in the eight MSBs.
[NOTE]
.Note
====
To copy both the depth and stencil aspects of a depth/stencil format, two
entries in pname:pRegions can: be used, where one specifies the depth
aspect in pname:imageSubresource, and the other specifies the stencil
aspect.
====
Because depth or stencil aspect buffer to image copies may: require format
conversions on some implementations, they are not supported on queues
that do not support graphics.
Copies are done layer by layer starting with image layer
pname:baseArrayLayer member of pname:imageSubresource. pname:layerCount
layers are copied from the source image or to the destination image.
include::../validity/structs/VkBufferImageCopy.txt[]
See Also
--------
basetype:VkDeviceSize, slink:VkExtent3D, slink:VkImageSubresourceLayers, slink:VkOffset3D, flink:vkCmdCopyBufferToImage, flink:vkCmdCopyImageToBuffer
Document Notes
--------------
For more information, see the Vulkan Specification at URL
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkBufferImageCopy
This page is extracted from the Vulkan Specification.
Fixes and changes should be made to the Specification,not directly.
include::footer.txt[]