Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_EXT_host_image_copy - device extension
VK_EXT_host_image_copy
- Name String
VK_EXT_host_image_copy
- Extension Type
- Device extension
- Registered Extension Number
- 271
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2 and VK_KHR_copy_commands2 and VK_KHR_format_feature_flags2
- Contact
- Extension Proposal
- VK_EXT_host_image_copy
Other Extension Metadata
- Last Modified Date
- 2023-04-26
- Contributors
- Shahbaz Youssefi, Google
- Faith Ekstrand, Collabora
- Hans-Kristian Arntzen, Valve
- Piers Daniell, NVIDIA
- Jan-Harald Fredriksen, Arm
- James Fitzpatrick, Imagination
- Daniel Story, Nintendo
Description
This extension allows applications to copy data between host memory and images on the host processor, without staging the data through a GPU-accessible buffer. This removes the need to allocate and manage the buffer and its associated memory. On some architectures it may also eliminate an extra copy operation. This extension additionally allows applications to copy data between images on the host.
To support initializing a new image in preparation for a host copy, it
is now possible to transition a new image to
IMAGE_LAYOUT_GENERAL
or other
host-copyable layouts via transitionImageLayoutEXT
. Additionally, it
is possible to perform copies that preserve the swizzling layout of the
image by using the HOST_IMAGE_COPY_MEMCPY_EXT
flag. In that case, the
memory size needed for copies to or from a buffer can be retrieved by
chaining SubresourceHostMemcpySizeEXT
to pLayout
in
getImageSubresourceLayout2EXT
.
New Commands
New Structures
CopyImageToMemoryInfoEXT
CopyMemoryToImageInfoEXT
HostImageLayoutTransitionInfoEXT
ImageSubresource2EXT
ImageToMemoryCopyEXT
MemoryToImageCopyEXT
SubresourceLayout2EXT
Extending
ImageFormatProperties2
:Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:Extending
PhysicalDeviceProperties2
:Extending
SubresourceLayout2KHR
:
New Enums
New Bitmasks
New Enum Constants
EXT_HOST_IMAGE_COPY_SPEC_VERSION
Extending
FormatFeatureFlagBits2
:Extending
ImageUsageFlagBits
:Extending
StructureType
:STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT
STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT
STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT
STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT
STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT
STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT
STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT
STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT
STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT
STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT
Issues
1) When uploading data to an image, the data is usually loaded from
disk. Why not have the application load the data directly into a
DeviceMemory
bound to a buffer (instead of host
memory), and use
cmdCopyBufferToImage
? The same
could be done when downloading data from an image.
RESOLVED: This may not always be possible. Complicated Vulkan applications such as game engines often have decoupled subsystems for streaming data and rendering. It may be unreasonable to require the streaming subsystem to coordinate with the rendering subsystem to allocate memory on its behalf, especially as Vulkan may not be the only API supported by the engine. In emulation layers, the image data is necessarily provided by the application in host memory, so an optimization as suggested is not possible. Most importantly, the device memory may not be mappable by an application, but still accessible to the driver.
2) Are optimalBufferCopyOffsetAlignment
and
optimalBufferCopyRowPitchAlignment
applicable to host memory as well
with the functions introduced by this extension? Or should there be new
limits?
RESOLVED: No alignment requirements for the host memory pointer.
3) Should there be granularity requirements for image offsets and extents?
RESOLVED: No granularity requirements, i.e. a granularity of 1 pixel (for non-compressed formats) and 1 texel block (for compressed formats) is assumed.
4) How should the application deal with layout transitions before or after copying to or from images?
RESOLVED: An existing issue with linear images is that when emulating other APIs, it is impossible to know when to transition them as they are written to by the host and then used bindlessly. The copy operations in this extension are affected by the same limitation. A new command is thus introduced by this extension to address this problem by allowing the host to perform an image layout transition between a handful of layouts.
Version History
Revision 0, 2021-01-20 (Faith Ekstrand)
- Initial idea and xml
Revision 1, 2023-04-26 (Shahbaz Youssefi)
- Initial revision
See Also
CopyImageToImageInfoEXT
, CopyImageToMemoryInfoEXT
,
CopyMemoryToImageInfoEXT
, HostImageCopyDevicePerformanceQueryEXT
,
HostImageCopyFlagBitsEXT
, HostImageCopyFlagsEXT
,
HostImageLayoutTransitionInfoEXT
, ImageSubresource2EXT
,
ImageToMemoryCopyEXT
, MemoryToImageCopyEXT
,
PhysicalDeviceHostImageCopyFeaturesEXT
,
PhysicalDeviceHostImageCopyPropertiesEXT
,
SubresourceHostMemcpySizeEXT
, SubresourceLayout2EXT
,
copyImageToImageEXT
, copyImageToMemoryEXT
, copyMemoryToImageEXT
,
getImageSubresourceLayout2EXT
, transitionImageLayoutEXT
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- copyMemoryToImageEXT :: forall io. MonadIO io => Device -> CopyMemoryToImageInfoEXT -> io ()
- copyImageToMemoryEXT :: forall io. MonadIO io => Device -> CopyImageToMemoryInfoEXT -> io ()
- copyImageToImageEXT :: forall io. MonadIO io => Device -> CopyImageToImageInfoEXT -> io ()
- transitionImageLayoutEXT :: forall io. MonadIO io => Device -> ("transitions" ::: Vector HostImageLayoutTransitionInfoEXT) -> io ()
- getImageSubresourceLayout2EXT :: forall {a :: [Type]} {io}. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> Image -> ImageSubresource2KHR -> io (SubresourceLayout2KHR a)
- data PhysicalDeviceHostImageCopyFeaturesEXT = PhysicalDeviceHostImageCopyFeaturesEXT {}
- data PhysicalDeviceHostImageCopyPropertiesEXT = PhysicalDeviceHostImageCopyPropertiesEXT {}
- data MemoryToImageCopyEXT = MemoryToImageCopyEXT {}
- data ImageToMemoryCopyEXT = ImageToMemoryCopyEXT {}
- data CopyMemoryToImageInfoEXT = CopyMemoryToImageInfoEXT {}
- data CopyImageToMemoryInfoEXT = CopyImageToMemoryInfoEXT {}
- data CopyImageToImageInfoEXT = CopyImageToImageInfoEXT {}
- data HostImageLayoutTransitionInfoEXT = HostImageLayoutTransitionInfoEXT {}
- data SubresourceHostMemcpySizeEXT = SubresourceHostMemcpySizeEXT {
- size :: DeviceSize
- data HostImageCopyDevicePerformanceQueryEXT = HostImageCopyDevicePerformanceQueryEXT {}
- type HostImageCopyFlagsEXT = HostImageCopyFlagBitsEXT
- newtype HostImageCopyFlagBitsEXT where
- type ImageSubresource2EXT = ImageSubresource2KHR
- type SubresourceLayout2EXT = SubresourceLayout2KHR
- type EXT_HOST_IMAGE_COPY_SPEC_VERSION = 1
- pattern EXT_HOST_IMAGE_COPY_SPEC_VERSION :: forall a. Integral a => a
- type EXT_HOST_IMAGE_COPY_EXTENSION_NAME = "VK_EXT_host_image_copy"
- pattern EXT_HOST_IMAGE_COPY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data ImageSubresource2KHR = ImageSubresource2KHR {}
- data SubresourceLayout2KHR (es :: [Type]) = SubresourceLayout2KHR {
- next :: Chain es
- subresourceLayout :: SubresourceLayout
- getImageSubresourceLayout2KHR :: forall a io. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> Image -> ImageSubresource2KHR -> io (SubresourceLayout2KHR a)
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> CopyMemoryToImageInfoEXT |
|
-> io () |
vkCopyMemoryToImageEXT - Copy data from host memory into an image
Description
This command is functionally similar to
cmdCopyBufferToImage2
,
except it is executed on the host and reads from host memory instead of
a buffer.
Valid Usage
- The hostImageCopy feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCopyMemoryToImageInfo
must be a valid pointer to a validCopyMemoryToImageInfoEXT
structure
Return Codes
See Also
:: forall io. MonadIO io | |
=> Device |
|
-> CopyImageToMemoryInfoEXT |
|
-> io () |
vkCopyImageToMemoryEXT - Copy image data into host memory
Description
This command is functionally similar to
cmdCopyImageToBuffer2
,
except it is executed on the host and writes to host memory instead of a
buffer.
Valid Usage
- The hostImageCopy feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCopyImageToMemoryInfo
must be a valid pointer to a validCopyImageToMemoryInfoEXT
structure
Return Codes
See Also
:: forall io. MonadIO io | |
=> Device |
|
-> CopyImageToImageInfoEXT |
|
-> io () |
vkCopyImageToImageEXT - Copy image data using the host
Description
This command is functionally similar to
cmdCopyImage2
,
except it is executed on the host.
Valid Usage
- The hostImageCopy feature must be enabled
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pCopyImageToImageInfo
must be a valid pointer to a validCopyImageToImageInfoEXT
structure
Return Codes
See Also
transitionImageLayoutEXT Source #
:: forall io. MonadIO io | |
=> Device |
|
-> ("transitions" ::: Vector HostImageLayoutTransitionInfoEXT) |
|
-> io () |
vkTransitionImageLayoutEXT - Perform an image layout transition on the host
Return Codes
See Also
VK_EXT_host_image_copy,
Device
, HostImageLayoutTransitionInfoEXT
getImageSubresourceLayout2EXT :: forall {a :: [Type]} {io}. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> Image -> ImageSubresource2KHR -> io (SubresourceLayout2KHR a) Source #
data PhysicalDeviceHostImageCopyFeaturesEXT Source #
VkPhysicalDeviceHostImageCopyFeaturesEXT - Structure indicating support for copies to or from images from host memory
Members
This structure describes the following feature:
Description
If the PhysicalDeviceHostImageCopyFeaturesEXT
structure is included in
the pNext
chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2
,
it is filled in to indicate whether each corresponding feature is
supported. PhysicalDeviceHostImageCopyFeaturesEXT
can also be used
in the pNext
chain of DeviceCreateInfo
to
selectively enable these features.
Valid Usage (Implicit)
See Also
PhysicalDeviceHostImageCopyFeaturesEXT | |
|
Instances
data PhysicalDeviceHostImageCopyPropertiesEXT Source #
VkPhysicalDeviceHostImageCopyPropertiesEXT - Structure enumerating image layouts supported by an implementation for host memory copies
Description
If the PhysicalDeviceHostImageCopyPropertiesEXT
structure is included
in the pNext
chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2
,
it is filled in with each corresponding implementation-dependent
property.
If pCopyDstLayouts
is NULL
, then the number of image layouts that
are supported in CopyMemoryToImageInfoEXT
::dstImageLayout
and
CopyImageToImageInfoEXT
::dstImageLayout
is returned in
copyDstLayoutCount
. Otherwise, copyDstLayoutCount
must be set by
the user to the number of elements in the pCopyDstLayouts
array, and
on return the variable is overwritten with the number of values actually
written to pCopyDstLayouts
. If the value of copyDstLayoutCount
is
less than the number of image layouts that are supported, at most
copyDstLayoutCount
values will be written to pCopyDstLayouts
. The
implementation must include the
IMAGE_LAYOUT_GENERAL
image layout in
pCopyDstLayouts
.
If pCopySrcLayouts
is NULL
, then the number of image layouts that
are supported in CopyImageToMemoryInfoEXT
::srcImageLayout
and
CopyImageToImageInfoEXT
::srcImageLayout
is returned in
copySrcLayoutCount
. Otherwise, copySrcLayoutCount
must be set by
the user to the number of elements in the pCopySrcLayouts
array, and
on return the variable is overwritten with the number of values actually
written to pCopySrcLayouts
. If the value of copySrcLayoutCount
is
less than the number of image layouts that are supported, at most
copySrcLayoutCount
values will be written to pCopySrcLayouts
. The
implementation must include the
IMAGE_LAYOUT_GENERAL
image layout in
pCopySrcLayouts
.
The optimalTilingLayoutUUID
value can be used to ensure compatible
data layouts when using the HOST_IMAGE_COPY_MEMCPY_EXT
flag in
copyMemoryToImageEXT
and copyImageToMemoryEXT
.
Valid Usage (Implicit)
-
If
copySrcLayoutCount
is not0
, andpCopySrcLayouts
is notNULL
,pCopySrcLayouts
must be a valid pointer to an array ofcopySrcLayoutCount
ImageLayout
values -
If
copyDstLayoutCount
is not0
, andpCopyDstLayouts
is notNULL
,pCopyDstLayouts
must be a valid pointer to an array ofcopyDstLayoutCount
ImageLayout
values
See Also
PhysicalDeviceHostImageCopyPropertiesEXT | |
|
Instances
data MemoryToImageCopyEXT Source #
VkMemoryToImageCopyEXT - Structure specifying a host memory to image copy operation
Description
This structure is functionally similar to
BufferImageCopy2
,
except it defines host memory as the source of copy instead of a buffer.
In particular, the same data packing rules and restrictions as that
structure apply here as well.
Valid Usage
-
pHostPointer
must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element ofpRegions
- The union of all source
regions, and the union of all destination regions, specified by the
elements of
pRegions
, must not overlap in memory -
memoryRowLength
must be0
, or greater than or equal to thewidth
member ofimageExtent
-
memoryImageHeight
must be0
, or greater than or equal to theheight
member ofimageExtent
- The
aspectMask
member ofimageSubresource
must only have a single bit set -
imageExtent.width
must not be 0 -
imageExtent.height
must not be 0 -
imageExtent.depth
must not be 0
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT
-
pNext
must beNULL
-
pHostPointer
must be a pointer value -
imageSubresource
must be a validImageSubresourceLayers
structure
See Also
VK_EXT_host_image_copy,
CopyMemoryToImageInfoEXT
, Extent3D
,
ImageSubresourceLayers
,
Offset3D
,
StructureType
MemoryToImageCopyEXT | |
|
Instances
data ImageToMemoryCopyEXT Source #
VkImageToMemoryCopyEXT - Structure specifying an image to host memory copy operation
Description
This structure is functionally similar to
BufferImageCopy2
,
except it defines host memory as the target of copy instead of a buffer.
In particular, the same data packing rules and restrictions as that
structure apply here as well.
Valid Usage
-
pHostPointer
must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element ofpRegions
- The union of all source
regions, and the union of all destination regions, specified by the
elements of
pRegions
, must not overlap in memory -
memoryRowLength
must be0
, or greater than or equal to thewidth
member ofimageExtent
-
memoryImageHeight
must be0
, or greater than or equal to theheight
member ofimageExtent
- The
aspectMask
member ofimageSubresource
must only have a single bit set -
imageExtent.width
must not be 0 -
imageExtent.height
must not be 0 -
imageExtent.depth
must not be 0
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT
-
pNext
must beNULL
-
pHostPointer
must be a pointer value -
imageSubresource
must be a validImageSubresourceLayers
structure
See Also
VK_EXT_host_image_copy,
CopyImageToMemoryInfoEXT
, Extent3D
,
ImageSubresourceLayers
,
Offset3D
,
StructureType
ImageToMemoryCopyEXT | |
|
Instances
data CopyMemoryToImageInfoEXT Source #
VkCopyMemoryToImageInfoEXT - Structure specifying parameters of host memory to image copy command
Description
copyMemoryToImageEXT
does not check whether the device memory
associated with dstImage
is currently in use before performing the
copy. The application must guarantee that any previously submitted
command that reads from or writes to the copy regions has completed
before the host performs the copy.
Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.
Valid Usage
- If
dstImage
is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory
- If the stencil
aspect of
dstImage
is accessed, anddstImage
was not created with separate stencil usage,dstImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If the stencil
aspect of
dstImage
is accessed, anddstImage
was created with separate stencil usage,dstImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageStencilUsageCreateInfo
::stencilUsage
- If non-stencil
aspects of
dstImage
are accessed,dstImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, thex
,y
, andz
members of theimageOffset
member of each element ofpRegions
must be0
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, theimageExtent
member of each element ofpRegions
must equal the extents ofdstImage
identified byimageSubresource
- If
dstImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleDeviceMemory
object - The
imageSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inImageCreateInfo
whendstImage
was created - If
imageSubresource.layerCount
is notREMAINING_ARRAY_LAYERS
,imageSubresource.baseArrayLayer
+imageSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inImageCreateInfo
whendstImage
was created -
dstImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
- The image
region specified by each element of
pRegions
must be contained within the specifiedimageSubresource
ofdstImage
- For each
element of
pRegions
,imageOffset.x
and (imageExtent.width
+imageOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifiedimageSubresource
ofdstImage
- For each
element of
pRegions
,imageOffset.y
and (imageExtent.height
+imageOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifiedimageSubresource
ofdstImage
-
dstImage
must have a sample count equal toSAMPLE_COUNT_1_BIT
- If
dstImage
is of typeIMAGE_TYPE_1D
, then for each element ofpRegions
,imageOffset.y
must be0
andimageExtent.height
must be1
- For each element
of
pRegions
,imageOffset.z
and (imageExtent.depth
+imageOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifiedimageSubresource
ofdstImage
- If
dstImage
is of typeIMAGE_TYPE_1D
orIMAGE_TYPE_2D
, then for each element ofpRegions
,imageOffset.z
must be0
andimageExtent.depth
must be1
- For each element of
pRegions
,imageOffset.x
must be a multiple of the texel block extent width of theFormat
ofdstImage
- For each element of
pRegions
,imageOffset.y
must be a multiple of the texel block extent height of theFormat
ofdstImage
- For each element of
pRegions
,imageOffset.z
must be a multiple of the texel block extent depth of theFormat
ofdstImage
- For each element of
pRegions
, if the sum ofimageOffset.x
andextent.width
does not equal the width of the subresource specified bysrcSubresource
,extent.width
must be a multiple of the texel block extent width of theFormat
ofdstImage
- For each element of
pRegions
, if the sum ofimageOffset.y
andextent.height
does not equal the height of the subresource specified bysrcSubresource
,extent.height
must be a multiple of the texel block extent height of theFormat
ofdstImage
- For each element of
pRegions
, if the sum ofimageOffset.z
andextent.depth
does not equal the depth of the subresource specified bysrcSubresource
,extent.depth
must be a multiple of the texel block extent depth of theFormat
ofdstImage
- For each
element of
pRegions
,imageSubresource.aspectMask
must specify aspects present indstImage
- If
dstImage
has a multi-planar image format, then for each element ofpRegions
,imageSubresource.aspectMask
must be a single valid multi-planar aspect mask bit - If
dstImage
is of typeIMAGE_TYPE_3D
, for each element ofpRegions
,imageSubresource.baseArrayLayer
must be0
andimageSubresource.layerCount
must be1
- For each
element of
pRegions
,memoryRowLength
must be a multiple of the texel block extent width of theFormat
ofdstImage
- For each
element of
pRegions
,memoryImageHeight
must be a multiple of the texel block extent height of theFormat
ofdstImage
- For each
element of
pRegions
,memoryRowLength
divided by the texel block extent width and then multiplied by the texel block size ofdstImage
must be less than or equal to 231-1 -
dstImageLayout
must specify the current layout of the image subresources ofdstImage
specified inpRegions
-
dstImageLayout
must be one of the image layouts returned inPhysicalDeviceHostImageCopyPropertiesEXT
::pCopyDstLayouts
- If
flags
includesHOST_IMAGE_COPY_MEMCPY_EXT
, for each region inpRegions
,memoryRowLength
andmemoryImageHeight
must both be 0
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT
-
pNext
must beNULL
-
flags
must be a valid combination ofHostImageCopyFlagBitsEXT
values -
dstImage
must be a validImage
handle -
dstImageLayout
must be a validImageLayout
value -
pRegions
must be a valid pointer to an array ofregionCount
validMemoryToImageCopyEXT
structures -
regionCount
must be greater than0
See Also
VK_EXT_host_image_copy,
HostImageCopyFlagsEXT
, Image
,
ImageLayout
, MemoryToImageCopyEXT
,
StructureType
,
copyMemoryToImageEXT
CopyMemoryToImageInfoEXT | |
|
Instances
Show CopyMemoryToImageInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_host_image_copy showsPrec :: Int -> CopyMemoryToImageInfoEXT -> ShowS # show :: CopyMemoryToImageInfoEXT -> String # showList :: [CopyMemoryToImageInfoEXT] -> ShowS # | |
FromCStruct CopyMemoryToImageInfoEXT Source # | |
ToCStruct CopyMemoryToImageInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_host_image_copy withCStruct :: CopyMemoryToImageInfoEXT -> (Ptr CopyMemoryToImageInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr CopyMemoryToImageInfoEXT -> CopyMemoryToImageInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr CopyMemoryToImageInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CopyMemoryToImageInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero CopyMemoryToImageInfoEXT Source # | |
data CopyImageToMemoryInfoEXT Source #
VkCopyImageToMemoryInfoEXT - Structure specifying parameters of an image to host memory copy command
Description
copyImageToMemoryEXT
does not check whether the device memory
associated with srcImage
is currently in use before performing the
copy. The application must guarantee that any previously submitted
command that writes to the copy regions has completed before the host
performs the copy.
Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.
Valid Usage
- If
srcImage
is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory
- If the stencil
aspect of
srcImage
is accessed, andsrcImage
was not created with separate stencil usage,srcImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If the stencil
aspect of
srcImage
is accessed, andsrcImage
was created with separate stencil usage,srcImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageStencilUsageCreateInfo
::stencilUsage
- If non-stencil
aspects of
srcImage
are accessed,srcImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, thex
,y
, andz
members of theimageOffset
member of each element ofpRegions
must be0
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, theimageExtent
member of each element ofpRegions
must equal the extents ofsrcImage
identified byimageSubresource
- If
srcImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleDeviceMemory
object - The
imageSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inImageCreateInfo
whensrcImage
was created - If
imageSubresource.layerCount
is notREMAINING_ARRAY_LAYERS
,imageSubresource.baseArrayLayer
+imageSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inImageCreateInfo
whensrcImage
was created -
srcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
- The image
region specified by each element of
pRegions
must be contained within the specifiedimageSubresource
ofsrcImage
- For each
element of
pRegions
,imageOffset.x
and (imageExtent.width
+imageOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifiedimageSubresource
ofsrcImage
- For each
element of
pRegions
,imageOffset.y
and (imageExtent.height
+imageOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifiedimageSubresource
ofsrcImage
-
srcImage
must have a sample count equal toSAMPLE_COUNT_1_BIT
- If
srcImage
is of typeIMAGE_TYPE_1D
, then for each element ofpRegions
,imageOffset.y
must be0
andimageExtent.height
must be1
- For each element
of
pRegions
,imageOffset.z
and (imageExtent.depth
+imageOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifiedimageSubresource
ofsrcImage
- If
srcImage
is of typeIMAGE_TYPE_1D
orIMAGE_TYPE_2D
, then for each element ofpRegions
,imageOffset.z
must be0
andimageExtent.depth
must be1
- For each element of
pRegions
,imageOffset.x
must be a multiple of the texel block extent width of theFormat
ofsrcImage
- For each element of
pRegions
,imageOffset.y
must be a multiple of the texel block extent height of theFormat
ofsrcImage
- For each element of
pRegions
,imageOffset.z
must be a multiple of the texel block extent depth of theFormat
ofsrcImage
- For each element of
pRegions
, if the sum ofimageOffset.x
andextent.width
does not equal the width of the subresource specified bysrcSubresource
,extent.width
must be a multiple of the texel block extent width of theFormat
ofsrcImage
- For each element of
pRegions
, if the sum ofimageOffset.y
andextent.height
does not equal the height of the subresource specified bysrcSubresource
,extent.height
must be a multiple of the texel block extent height of theFormat
ofsrcImage
- For each element of
pRegions
, if the sum ofimageOffset.z
andextent.depth
does not equal the depth of the subresource specified bysrcSubresource
,extent.depth
must be a multiple of the texel block extent depth of theFormat
ofsrcImage
- For each
element of
pRegions
,imageSubresource.aspectMask
must specify aspects present insrcImage
- If
srcImage
has a multi-planar image format, then for each element ofpRegions
,imageSubresource.aspectMask
must be a single valid multi-planar aspect mask bit - If
srcImage
is of typeIMAGE_TYPE_3D
, for each element ofpRegions
,imageSubresource.baseArrayLayer
must be0
andimageSubresource.layerCount
must be1
- For each
element of
pRegions
,memoryRowLength
must be a multiple of the texel block extent width of theFormat
ofsrcImage
- For each
element of
pRegions
,memoryImageHeight
must be a multiple of the texel block extent height of theFormat
ofsrcImage
- For each
element of
pRegions
,memoryRowLength
divided by the texel block extent width and then multiplied by the texel block size ofsrcImage
must be less than or equal to 231-1 -
srcImageLayout
must specify the current layout of the image subresources ofsrcImage
specified inpRegions
-
srcImageLayout
must be one of the image layouts returned inPhysicalDeviceHostImageCopyPropertiesEXT
::pCopySrcLayouts
- If
flags
includesHOST_IMAGE_COPY_MEMCPY_EXT
, for each region inpRegions
,memoryRowLength
andmemoryImageHeight
must both be 0
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT
-
pNext
must beNULL
-
flags
must be a valid combination ofHostImageCopyFlagBitsEXT
values -
srcImage
must be a validImage
handle -
srcImageLayout
must be a validImageLayout
value -
pRegions
must be a valid pointer to an array ofregionCount
validImageToMemoryCopyEXT
structures -
regionCount
must be greater than0
See Also
VK_EXT_host_image_copy,
HostImageCopyFlagsEXT
, Image
,
ImageLayout
, ImageToMemoryCopyEXT
,
StructureType
,
copyImageToMemoryEXT
CopyImageToMemoryInfoEXT | |
|
Instances
Show CopyImageToMemoryInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_host_image_copy showsPrec :: Int -> CopyImageToMemoryInfoEXT -> ShowS # show :: CopyImageToMemoryInfoEXT -> String # showList :: [CopyImageToMemoryInfoEXT] -> ShowS # | |
FromCStruct CopyImageToMemoryInfoEXT Source # | |
ToCStruct CopyImageToMemoryInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_host_image_copy withCStruct :: CopyImageToMemoryInfoEXT -> (Ptr CopyImageToMemoryInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr CopyImageToMemoryInfoEXT -> CopyImageToMemoryInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr CopyImageToMemoryInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CopyImageToMemoryInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero CopyImageToMemoryInfoEXT Source # | |
data CopyImageToImageInfoEXT Source #
VkCopyImageToImageInfoEXT - Structure specifying parameters of an image to image host copy command
Description
copyImageToImageEXT
does not check whether the device memory
associated with srcImage
or dstImage
is currently in use before
performing the copy. The application must guarantee that any
previously submitted command that writes to the copy regions has
completed before the host performs the copy.
Valid Usage
- If
srcImage
is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory - If the stencil
aspect of
srcImage
is accessed, andsrcImage
was not created with separate stencil usage,srcImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If the stencil
aspect of
srcImage
is accessed, andsrcImage
was created with separate stencil usage,srcImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageStencilUsageCreateInfo
::stencilUsage
- If non-stencil
aspects of
srcImage
are accessed,srcImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, thex
,y
, andz
members of thesrcOffset
member of each element ofpRegions
must be0
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, theextent
member of each element ofpRegions
must equal the extents ofsrcImage
identified bysrcSubresource
- If
srcImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleDeviceMemory
object - The
srcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inImageCreateInfo
whensrcImage
was created - If
srcSubresource.layerCount
is notREMAINING_ARRAY_LAYERS
,srcSubresource.baseArrayLayer
+srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inImageCreateInfo
whensrcImage
was created -
srcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
- The image
region specified by each element of
pRegions
must be contained within the specifiedsrcSubresource
ofsrcImage
- For each
element of
pRegions
,srcOffset.x
and (extent.width
+srcOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifiedsrcSubresource
ofsrcImage
- For each
element of
pRegions
,srcOffset.y
and (extent.height
+srcOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifiedsrcSubresource
ofsrcImage
- If
srcImage
is of typeIMAGE_TYPE_1D
, then for each element ofpRegions
,srcOffset.y
must be0
andextent.height
must be1
- For each element of
pRegions
,srcOffset.z
and (extent.depth
+srcOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifiedsrcSubresource
ofsrcImage
- If
srcImage
is of typeIMAGE_TYPE_1D
orIMAGE_TYPE_2D
, then for each element ofpRegions
,srcOffset.z
must be0
andextent.depth
must be1
- For each element of
pRegions
,srcOffset.x
must be a multiple of the texel block extent width of theFormat
ofsrcImage
- For each element of
pRegions
,srcOffset.y
must be a multiple of the texel block extent height of theFormat
ofsrcImage
- For each element of
pRegions
,srcOffset.z
must be a multiple of the texel block extent depth of theFormat
ofsrcImage
- For each element of
pRegions
, if the sum ofsrcOffset.x
andextent.width
does not equal the width of the subresource specified bysrcSubresource
,extent.width
must be a multiple of the texel block extent width of theFormat
ofsrcImage
- For each element of
pRegions
, if the sum ofsrcOffset.y
andextent.height
does not equal the height of the subresource specified bysrcSubresource
,extent.height
must be a multiple of the texel block extent height of theFormat
ofsrcImage
- For each element of
pRegions
, if the sum ofsrcOffset.z
andextent.depth
does not equal the depth of the subresource specified bysrcSubresource
,extent.depth
must be a multiple of the texel block extent depth of theFormat
ofsrcImage
- For each
element of
pRegions
,srcSubresource.aspectMask
must specify aspects present insrcImage
- If
srcImage
has a multi-planar image format, then for each element ofpRegions
,srcSubresource.aspectMask
must be a single valid multi-planar aspect mask bit - If
srcImage
is of typeIMAGE_TYPE_3D
, for each element ofpRegions
,srcSubresource.baseArrayLayer
must be0
andsrcSubresource.layerCount
must be1
- If
dstImage
is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory - If the stencil
aspect of
dstImage
is accessed, anddstImage
was not created with separate stencil usage,dstImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If the stencil
aspect of
dstImage
is accessed, anddstImage
was created with separate stencil usage,dstImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageStencilUsageCreateInfo
::stencilUsage
- If non-stencil
aspects of
dstImage
are accessed,dstImage
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
set inImageCreateInfo
::usage
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, thex
,y
, andz
members of thedstOffset
member of each element ofpRegions
must be0
- If
flags
containsHOST_IMAGE_COPY_MEMCPY_EXT
, theextent
member of each element ofpRegions
must equal the extents ofdstImage
identified bydstSubresource
- If
dstImage
is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a singleDeviceMemory
object - The
dstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inImageCreateInfo
whendstImage
was created - If
dstSubresource.layerCount
is notREMAINING_ARRAY_LAYERS
,dstSubresource.baseArrayLayer
+dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inImageCreateInfo
whendstImage
was created -
dstImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
- The image
region specified by each element of
pRegions
must be contained within the specifieddstSubresource
ofdstImage
- For each
element of
pRegions
,dstOffset.x
and (extent.width
+dstOffset.x
) must both be greater than or equal to0
and less than or equal to the width of the specifieddstSubresource
ofdstImage
- For each
element of
pRegions
,dstOffset.y
and (extent.height
+dstOffset.y
) must both be greater than or equal to0
and less than or equal to the height of the specifieddstSubresource
ofdstImage
- If
dstImage
is of typeIMAGE_TYPE_1D
, then for each element ofpRegions
,dstOffset.y
must be0
andextent.height
must be1
- For each element of
pRegions
,dstOffset.z
and (extent.depth
+dstOffset.z
) must both be greater than or equal to0
and less than or equal to the depth of the specifieddstSubresource
ofdstImage
- If
dstImage
is of typeIMAGE_TYPE_1D
orIMAGE_TYPE_2D
, then for each element ofpRegions
,dstOffset.z
must be0
andextent.depth
must be1
- For each element of
pRegions
,dstOffset.x
must be a multiple of the texel block extent width of theFormat
ofdstImage
- For each element of
pRegions
,dstOffset.y
must be a multiple of the texel block extent height of theFormat
ofdstImage
- For each element of
pRegions
,dstOffset.z
must be a multiple of the texel block extent depth of theFormat
ofdstImage
- For each element of
pRegions
, if the sum ofdstOffset.x
andextent.width
does not equal the width of the subresource specified bysrcSubresource
,extent.width
must be a multiple of the texel block extent width of theFormat
ofdstImage
- For each element of
pRegions
, if the sum ofdstOffset.y
andextent.height
does not equal the height of the subresource specified bysrcSubresource
,extent.height
must be a multiple of the texel block extent height of theFormat
ofdstImage
- For each element of
pRegions
, if the sum ofdstOffset.z
andextent.depth
does not equal the depth of the subresource specified bysrcSubresource
,extent.depth
must be a multiple of the texel block extent depth of theFormat
ofdstImage
- For each
element of
pRegions
,dstSubresource.aspectMask
must specify aspects present indstImage
- If
dstImage
has a multi-planar image format, then for each element ofpRegions
,dstSubresource.aspectMask
must be a single valid multi-planar aspect mask bit - If
dstImage
is of typeIMAGE_TYPE_3D
, for each element ofpRegions
,dstSubresource.baseArrayLayer
must be0
anddstSubresource.layerCount
must be1
-
srcImageLayout
must specify the current layout of the image subresources ofsrcImage
specified inpRegions
-
dstImageLayout
must specify the current layout of the image subresources ofdstImage
specified inpRegions
-
srcImageLayout
must be one of the image layouts returned inPhysicalDeviceHostImageCopyPropertiesEXT
::pCopySrcLayouts
-
dstImageLayout
must be one of the image layouts returned inPhysicalDeviceHostImageCopyPropertiesEXT
::pCopyDstLayouts
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT
-
pNext
must beNULL
-
flags
must be a valid combination ofHostImageCopyFlagBitsEXT
values -
srcImage
must be a validImage
handle -
srcImageLayout
must be a validImageLayout
value -
dstImage
must be a validImage
handle -
dstImageLayout
must be a validImageLayout
value -
pRegions
must be a valid pointer to an array ofregionCount
validImageCopy2
structures -
regionCount
must be greater than0
- Both of
dstImage
, andsrcImage
must have been created, allocated, or retrieved from the sameDevice
See Also
VK_EXT_host_image_copy,
HostImageCopyFlagsEXT
, Image
,
ImageCopy2
,
ImageLayout
,
StructureType
, copyImageToImageEXT
CopyImageToImageInfoEXT | |
|
Instances
Show CopyImageToImageInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_host_image_copy showsPrec :: Int -> CopyImageToImageInfoEXT -> ShowS # show :: CopyImageToImageInfoEXT -> String # showList :: [CopyImageToImageInfoEXT] -> ShowS # | |
FromCStruct CopyImageToImageInfoEXT Source # | |
ToCStruct CopyImageToImageInfoEXT Source # | |
Defined in Vulkan.Extensions.VK_EXT_host_image_copy withCStruct :: CopyImageToImageInfoEXT -> (Ptr CopyImageToImageInfoEXT -> IO b) -> IO b Source # pokeCStruct :: Ptr CopyImageToImageInfoEXT -> CopyImageToImageInfoEXT -> IO b -> IO b Source # withZeroCStruct :: (Ptr CopyImageToImageInfoEXT -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CopyImageToImageInfoEXT -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero CopyImageToImageInfoEXT Source # | |
data HostImageLayoutTransitionInfoEXT Source #
VkHostImageLayoutTransitionInfoEXT - Structure specifying the parameters of a host-side image layout transition
Description
transitionImageLayoutEXT
does not check whether the device memory
associated with an image is currently in use before performing the
layout transition. The application must guarantee that any previously
submitted command that reads from or writes to this subresource has
completed before the host performs the layout transition.
Note
Image layout transitions performed on the host do not require queue family ownership transfers as the physical layout of the image will not vary between queue families for the layouts supported by this function.
Valid Usage
-
image
must have been created withIMAGE_USAGE_HOST_TRANSFER_BIT_EXT
-
subresourceRange.baseMipLevel
must be less than themipLevels
specified inImageCreateInfo
whenimage
was created - If
subresourceRange.levelCount
is notREMAINING_MIP_LEVELS
,subresourceRange.baseMipLevel
+subresourceRange.levelCount
must be less than or equal to themipLevels
specified inImageCreateInfo
whenimage
was created -
subresourceRange.baseArrayLayer
must be less than thearrayLayers
specified inImageCreateInfo
whenimage
was created - If
subresourceRange.layerCount
is notREMAINING_ARRAY_LAYERS
,subresourceRange.baseArrayLayer
+subresourceRange.layerCount
must be less than or equal to thearrayLayers
specified inImageCreateInfo
whenimage
was created - If
image
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - If
image
has a color format that is single-plane, then theaspectMask
member ofsubresourceRange
must beIMAGE_ASPECT_COLOR_BIT
- If
image
has a color format and is not disjoint, then theaspectMask
member ofsubresourceRange
must beIMAGE_ASPECT_COLOR_BIT
- If
image
has a multi-planar format and the image is disjoint, then theaspectMask
member ofsubresourceRange
must include at least one multi-planar aspect mask bit orIMAGE_ASPECT_COLOR_BIT
- If
image
has a depth/stencil format with both depth and stencil and the separateDepthStencilLayouts feature is enabled, then theaspectMask
member ofsubresourceRange
must include either or bothIMAGE_ASPECT_DEPTH_BIT
andIMAGE_ASPECT_STENCIL_BIT
- If
image
has a depth/stencil format with both depth and stencil and the separateDepthStencilLayouts feature is not enabled, then theaspectMask
member ofsubresourceRange
must include bothIMAGE_ASPECT_DEPTH_BIT
andIMAGE_ASPECT_STENCIL_BIT
- If the
aspectMask
member ofsubresourceRange
includesIMAGE_ASPECT_DEPTH_BIT
,oldLayout
andnewLayout
must not be one ofIMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL
orIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL
- If the
aspectMask
member ofsubresourceRange
includesIMAGE_ASPECT_STENCIL_BIT
,oldLayout
andnewLayout
must not be one ofIMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL
orIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL
-
oldLayout
must be eitherIMAGE_LAYOUT_UNDEFINED
or the current layout of the image subresources as specified insubresourceRange
- If
oldLayout
is notIMAGE_LAYOUT_UNDEFINED
orIMAGE_LAYOUT_PREINITIALIZED
, it must be one of the layouts inPhysicalDeviceHostImageCopyPropertiesEXT
::pCopySrcLayouts
-
newLayout
must be one of the layouts inPhysicalDeviceHostImageCopyPropertiesEXT
::pCopyDstLayouts
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT
-
pNext
must beNULL
-
image
must be a validImage
handle -
oldLayout
must be a validImageLayout
value -
newLayout
must be a validImageLayout
value -
subresourceRange
must be a validImageSubresourceRange
structure
See Also
VK_EXT_host_image_copy,
Image
,
ImageLayout
,
ImageSubresourceRange
,
StructureType
,
transitionImageLayoutEXT
HostImageLayoutTransitionInfoEXT | |
|
Instances
data SubresourceHostMemcpySizeEXT Source #
VkSubresourceHostMemcpySizeEXT - Memory size needed to copy to or from an image on the host with VK_HOST_IMAGE_COPY_MEMCPY_EXT
Valid Usage (Implicit)
See Also
SubresourceHostMemcpySizeEXT | |
|
Instances
data HostImageCopyDevicePerformanceQueryEXT Source #
VkHostImageCopyDevicePerformanceQueryEXT - Struct containing information about optimality of device access
Description
The implementation may return FALSE
in optimalDeviceAccess
if identicalMemoryLayout
is
FALSE
. If identicalMemoryLayout
is
TRUE
, optimalDeviceAccess
must be
TRUE
.
The implementation may return TRUE
in
optimalDeviceAccess
while identicalMemoryLayout
is
FALSE
. In this situation, any device
performance impact should not be measurable.
If
PhysicalDeviceImageFormatInfo2
::format
is a block-compressed format and
getPhysicalDeviceImageFormatProperties2
returns SUCCESS
, the implementation must
return TRUE
in optimalDeviceAccess
.
Note
Applications can make use of optimalDeviceAccess
to determine their
resource copying strategy. If a resource is expected to be accessed more
on device than on the host, and the implementation considers the
resource sub-optimally accessed, it is likely better to use device
copies instead.
Note
Layout not being identical yet still considered optimal for device access could happen if the implementation has different memory layout patterns, some of which are easier to access on the host.
Note
The most practical reason for optimalDeviceAccess
to be
FALSE
is that host image access may
disable framebuffer compression where it would otherwise have been
enabled. This represents far more efficient host image access since no
compression algorithm is required to read or write to the image, but it
would impact device access performance. Some implementations may only
set optimalDeviceAccess
to FALSE
if
certain conditions are met, such as specific image usage flags or
creation flags.
Valid Usage (Implicit)
See Also
HostImageCopyDevicePerformanceQueryEXT | |
|
Instances
newtype HostImageCopyFlagBitsEXT Source #
VkHostImageCopyFlagBitsEXT - Bitmask specifying additional copy parameters
See Also
pattern HOST_IMAGE_COPY_MEMCPY_EXT :: HostImageCopyFlagBitsEXT |
|
Instances
type EXT_HOST_IMAGE_COPY_SPEC_VERSION = 1 Source #
pattern EXT_HOST_IMAGE_COPY_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_HOST_IMAGE_COPY_EXTENSION_NAME = "VK_EXT_host_image_copy" Source #
pattern EXT_HOST_IMAGE_COPY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data ImageSubresource2KHR Source #
VkImageSubresource2KHR - Structure specifying an image subresource
Valid Usage (Implicit)
See Also
VK_EXT_host_image_copy,
VK_EXT_image_compression_control,
VK_KHR_maintenance5,
DeviceImageSubresourceInfoKHR
,
ImageSubresource
,
StructureType
,
getImageSubresourceLayout2EXT
,
getImageSubresourceLayout2KHR
ImageSubresource2KHR | |
|
Instances
data SubresourceLayout2KHR (es :: [Type]) Source #
VkSubresourceLayout2KHR - Structure specifying subresource layout
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofImageCompressionPropertiesEXT
orSubresourceHostMemcpySizeEXT
- The
sType
value of each struct in thepNext
chain must be unique
See Also
VK_EXT_host_image_copy,
VK_EXT_image_compression_control,
VK_KHR_maintenance5,
StructureType
,
SubresourceLayout
,
getDeviceImageSubresourceLayoutKHR
,
getImageSubresourceLayout2EXT
,
getImageSubresourceLayout2KHR
SubresourceLayout2KHR | |
|
Instances
getImageSubresourceLayout2KHR Source #
:: forall a io. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) | |
=> Device |
|
-> Image |
|
-> ImageSubresource2KHR |
|
-> io (SubresourceLayout2KHR a) |
vkGetImageSubresourceLayout2KHR - Retrieve information about an image subresource
Description
getImageSubresourceLayout2KHR
behaves similarly to
getImageSubresourceLayout
, with the ability to
specify extended inputs via chained input structures, and to return
extended information via chained output structures.
It is legal to call getImageSubresourceLayout2KHR
with a image
created with tiling
equal to
IMAGE_TILING_OPTIMAL
, but the members
of SubresourceLayout2KHR
::subresourceLayout
will have undefined
values in this case.
Note
Structures chained from ImageSubresource2KHR
::pNext
will also be
updated when tiling
is equal to
IMAGE_TILING_OPTIMAL
.
Valid Usage
- The
mipLevel
member ofpSubresource
must be less than themipLevels
specified inImageCreateInfo
whenimage
was created - The
arrayLayer
member ofpSubresource
must be less than thearrayLayers
specified inImageCreateInfo
whenimage
was created - If
format
of theimage
is a color format,tiling
of theimage
isIMAGE_TILING_LINEAR
orIMAGE_TILING_OPTIMAL
, and does not have a multi-planar image format, theaspectMask
member ofpSubresource
must beIMAGE_ASPECT_COLOR_BIT
- If
format
of theimage
has a depth component, theaspectMask
member ofpSubresource
must containIMAGE_ASPECT_DEPTH_BIT
- If
format
of theimage
has a stencil component, theaspectMask
member ofpSubresource
must containIMAGE_ASPECT_STENCIL_BIT
- If
format
of theimage
does not contain a stencil or depth component, theaspectMask
member ofpSubresource
must not containIMAGE_ASPECT_DEPTH_BIT
orIMAGE_ASPECT_STENCIL_BIT
- If the
tiling
of theimage
isIMAGE_TILING_LINEAR
and has a multi-planar image format, then theaspectMask
member ofpSubresource
must be a single valid multi-planar aspect mask bit - If
image
was created with theEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
external memory handle type, thenimage
must be bound to memory - If the
tiling
of theimage
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, then theaspectMask
member ofpSubresource
must beVK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT
and the index i must be less than theDrmFormatModifierPropertiesEXT
::drmFormatModifierPlaneCount
associated with the image’sformat
andImageDrmFormatModifierPropertiesEXT
::drmFormatModifier
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
image
must be a validImage
handle -
pSubresource
must be a valid pointer to a validImageSubresource2KHR
structure -
pLayout
must be a valid pointer to aSubresourceLayout2KHR
structure -
image
must have been created, allocated, or retrieved fromdevice
See Also
VK_KHR_maintenance5,
Device
, Image
,
ImageSubresource2KHR
, SubresourceLayout2KHR