| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_KHR_copy_memory_indirect
Description
Name
VK_KHR_copy_memory_indirect - device extension
VK_KHR_copy_memory_indirect
- Name String
VK_KHR_copy_memory_indirect
- Extension Type
- Device extension
- Registered Extension Number
- 550
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 and
VK_KHR_buffer_device_address or Vulkan Version 1.2
- Contact
- Extension Proposal
- VK_KHR_copy_memory_indirect
Other Extension Metadata
- Last Modified Date
- 2025-01-25
- Contributors
- Daniel Koch, NVIDIA
- Vikram Kushwaha, NVIDIA
- Jeff Bolz, NVIDIA
- Christoph Kubisch, NVIDIA
- Stuart Smith, AMD
- Faith Ekstrand, Collabora
- Caterina Shablia, Collabora
- Spencer Fricke, LunarG
- Matthew Netsch, Qualcomm Technologies, Inc
- Mike Blumenkrantz, Valve
- Alyssa Rosenzweig, Valve
Description
This extension adds support for performing copies between memory and image regions using indirect parameters that are read by the device from a buffer during execution. This functionality may be useful for performing copies where the copy parameters are not known during the command buffer creation time.
New Commands
New Structures
CopyMemoryIndirectInfoKHRCopyMemoryToImageIndirectCommandKHRCopyMemoryToImageIndirectInfoKHRStridedDeviceAddressRangeKHRExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
New Bitmasks
New Enum Constants
KHR_COPY_MEMORY_INDIRECT_SPEC_VERSIONExtending
FormatFeatureFlagBits2:Extending
PipelineStageFlagBits2:Extending
StructureType:
Version History
Revision 1, 2025-01-25 (Daniel Koch, Vikram Kushwaha)
- Initial external release
See Also
No cross-references are available
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
- cmdCopyMemoryIndirectKHR :: MonadIO io => CommandBuffer -> CopyMemoryIndirectInfoKHR -> io ()
- cmdCopyMemoryToImageIndirectKHR :: MonadIO io => CommandBuffer -> CopyMemoryToImageIndirectInfoKHR -> io ()
- data StridedDeviceAddressRangeKHR = StridedDeviceAddressRangeKHR {}
- data CopyMemoryIndirectCommandKHR = CopyMemoryIndirectCommandKHR {}
- data CopyMemoryIndirectInfoKHR = CopyMemoryIndirectInfoKHR {}
- data CopyMemoryToImageIndirectCommandKHR = CopyMemoryToImageIndirectCommandKHR {}
- data CopyMemoryToImageIndirectInfoKHR = CopyMemoryToImageIndirectInfoKHR {}
- data PhysicalDeviceCopyMemoryIndirectFeaturesKHR = PhysicalDeviceCopyMemoryIndirectFeaturesKHR {}
- data PhysicalDeviceCopyMemoryIndirectPropertiesKHR = PhysicalDeviceCopyMemoryIndirectPropertiesKHR {}
- type AddressCopyFlagsKHR = AddressCopyFlagBitsKHR
- newtype AddressCopyFlagBitsKHR where
- type KHR_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1
- pattern KHR_COPY_MEMORY_INDIRECT_SPEC_VERSION :: Integral a => a
- type KHR_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_KHR_copy_memory_indirect"
- pattern KHR_COPY_MEMORY_INDIRECT_EXTENSION_NAME :: (Eq a, IsString a) => a
Documentation
cmdCopyMemoryIndirectKHR Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> CopyMemoryIndirectInfoKHR |
|
| -> io () |
vkCmdCopyMemoryIndirectKHR - Copy data between memory regions
Description
Each region specified in the memory referenced by
pCopyMemoryIndirectInfo->copyAddressRange is copied from the source
region to the specified destination region. The results are undefined if
any of the source and destination regions overlap in memory.
Valid Usage
- The indirectMemoryCopy feature must be enabled
- The
CommandPoolthatcommandBufferwas allocated from must support at least one of the queue types specified inPhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues -
commandBuffermust not be a protected command buffer
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pCopyMemoryIndirectInfomust be a valid pointer to a validCopyMemoryIndirectInfoKHRstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIT,QUEUE_GRAPHICS_BIT, orQUEUE_TRANSFER_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action |
Conditional Rendering
vkCmdCopyMemoryIndirectKHR is not affected by conditional rendering
See Also
VK_KHR_copy_memory_indirect,
CommandBuffer, CopyMemoryIndirectInfoKHR
cmdCopyMemoryToImageIndirectKHR Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> CopyMemoryToImageIndirectInfoKHR |
|
| -> io () |
vkCmdCopyMemoryToImageIndirectKHR - Copy data from a memory region to an image object
Description
Each region specified in the memory referenced by
pCopyMemoryToImageIndirectInfo->copyAddressRange is copied from the
source region to an image region in the destination image. If the
destination image is of type
IMAGE_TYPE_3D, the starting slice and
number of slices to copy are specified in
pImageSubresources->baseArrayLayer and
pImageSubresources->layerCount respectively as imageOffset and
imageExtent from CopyMemoryToImageIndirectCommandKHR are only
available at device execution time. The results are undefined if any of
the source and destination regions overlap in memory.
Valid Usage
- The indirectMemoryToImageCopy feature must be enabled
- The
CommandPoolthatcommandBufferwas allocated from must support at least one of the queue types specified inPhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues -
commandBuffermust not be a protected command buffer
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pCopyMemoryToImageIndirectInfomust be a valid pointer to a validCopyMemoryToImageIndirectInfoKHRstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIT,QUEUE_GRAPHICS_BIT, orQUEUE_TRANSFER_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BIT | Action |
Conditional Rendering
vkCmdCopyMemoryToImageIndirectKHR is not affected by conditional rendering
See Also
VK_KHR_copy_memory_indirect,
CommandBuffer,
CopyMemoryToImageIndirectInfoKHR
data StridedDeviceAddressRangeKHR Source #
VkStridedDeviceAddressRangeKHR - Structure specifying a device address range with a stride
Valid Usage
- The sum of
addressandsizemust be less than or equal to the sum of an address retrieved from aBufferand the value ofBufferCreateInfo::sizeused to create thatBuffer -
stridemust be less than or equal tosize
Valid Usage (Implicit)
- If
addressis not0,addressmust be a validDeviceAddressvalue
See Also
VK_KHR_copy_memory_indirect,
CopyMemoryIndirectInfoKHR, CopyMemoryToImageIndirectInfoKHR,
DeviceAddress,
DeviceSize
Constructors
| StridedDeviceAddressRangeKHR | |
Fields
| |
Instances
data CopyMemoryIndirectCommandKHR Source #
VkCopyMemoryIndirectCommandKHR - Structure specifying indirect memory region copy operation
Valid Usage
- The
dstAddressmust be 4 byte aligned - The
sizemust be 4 byte aligned - The memory in
range [
srcAddress,srcAddress+size- 1] must be within the bounds of the memory allocation backingsrcAddress - The memory in
range [
dstAddress,dstAddress+size- 1] must be within the bounds of the memory allocation backingdstAddress - The range of
memory defined by
srcAddressandsizemust be a device address range allocated to the application from a buffer created with theBUFFER_USAGE_TRANSFER_SRC_BITusage flag set - The range of
memory defined by
dstAddressandsizemust be a device address range allocated to the application from a buffer created with theBUFFER_USAGE_TRANSFER_DST_BITusage flag set
Valid Usage (Implicit)
-
srcAddressmust be a validDeviceAddressvalue
-
dstAddressmust be a validDeviceAddressvalue
See Also
VK_KHR_copy_memory_indirect,
VK_NV_copy_memory_indirect,
DeviceAddress,
DeviceSize
Constructors
| CopyMemoryIndirectCommandKHR | |
Fields
| |
Instances
data CopyMemoryIndirectInfoKHR Source #
VkCopyMemoryIndirectInfoKHR - Parameters describing indirect copy parameters
Valid Usage
- If
srcCopyFlagscontainsADDRESS_COPY_SPARSE_BIT_KHR, the source memory regions accessed must be bound to memory
- If
dstCopyFlagscontainsADDRESS_COPY_SPARSE_BIT_KHR, the destination memory regions accessed must be bound to memory -
srcCopyFlagsmust not containADDRESS_COPY_PROTECTED_BIT_KHR -
dstCopyFlagsmust not containADDRESS_COPY_PROTECTED_BIT_KHR -
copyAddressRange.addressmust be 4 byte aligned -
copyAddressRange.stridemust be a multiple of4and must be greater than or equal to sizeof(CopyMemoryIndirectCommandKHR) -
copyCountmust be less than or equal tocopyAddressRange.size/copyAddressRange.stride - Any of the
source or destination memory regions specified in
copyAddressRangemust not overlap with any of the specified destination memory regions -
copyAddressRangemust be a device address range allocated to the application from a buffer created with theBUFFER_USAGE_INDIRECT_BUFFER_BITusage flag set
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COPY_MEMORY_INDIRECT_INFO_KHR
-
pNextmust beNULL -
srcCopyFlagsmust be a valid combination ofAddressCopyFlagBitsKHRvalues -
dstCopyFlagsmust be a valid combination ofAddressCopyFlagBitsKHRvalues
See Also
VK_KHR_copy_memory_indirect,
AddressCopyFlagsKHR, StridedDeviceAddressRangeKHR,
StructureType,
cmdCopyMemoryIndirectKHR
Constructors
| CopyMemoryIndirectInfoKHR | |
Fields
| |
Instances
data CopyMemoryToImageIndirectCommandKHR Source #
VkCopyMemoryToImageIndirectCommandKHR - Structure specifying indirect memory region to image copy operation
Valid Usage
- If
dstImagedoes not have either a depth/stencil format or a multi-planar format,srcAddressmust be a multiple of the texel block size - If
dstImagehas a multi-planar format,srcAddressmust be a multiple of the element size of the compatible format for the format and theaspectMaskof theimageSubresourceas defined in ??? -
bufferRowLengthmust be0, or greater than or equal to thewidthmember ofimageExtent -
bufferImageHeightmust be0, or greater than or equal to theheightmember ofimageExtent -
imageOffsetmust specify a valid offset in the destination image -
imageExtentmust specify a valid region in the destination image and can be0 - The
memory region starting at
srcAddressand described bybufferRowLengthandbufferImageHeightmust not exceed the bounds of the memory allocation backing memory atsrcAddress - The
imageOffsetandimageExtentmembers of each region must respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inQueueFamilyProperties - For
each destination region,
imageOffset.xand (imageExtent.width+imageOffset.x) must both be greater than or equal to0and less than or equal to the width of the specified subresource - For
each destination region,
imageOffset.yand (imageExtent.height+imageOffset.y) must both be greater than or equal to0and less than or equal to the height of the specified subresource -
The members of
imageSubresourcemust be identical to the members of theImageSubresourceLayersstructure specified in the corresponding index of thepCopyMemoryToImageIndirectInfo->pImageSubresourcesarray ofcmdCopyMemoryToImageIndirectKHRduring command recording - If
dstImageis of typeIMAGE_TYPE_1D,imageOffset.ymust be0andimageExtent.heightmust be1 - If
dstImageis of typeIMAGE_TYPE_1DorIMAGE_TYPE_2D,imageOffset.zmust be0andimageExtent.depthmust be1 -
srcAddressmust be a device address allocated to the application from a buffer created with theBUFFER_USAGE_TRANSFER_SRC_BITusage flag set
Valid Usage (Implicit)
-
srcAddressmust be a validDeviceAddressvalue
-
imageSubresourcemust be a validImageSubresourceLayersstructure
See Also
VK_KHR_copy_memory_indirect,
VK_NV_copy_memory_indirect,
DeviceAddress,
Extent3D,
ImageSubresourceLayers,
Offset3D
Constructors
| CopyMemoryToImageIndirectCommandKHR | |
Fields
| |
Instances
data CopyMemoryToImageIndirectInfoKHR Source #
VkCopyMemoryToImageIndirectInfoKHR - Parameters describing indirect image copy parameters
Valid Usage
- If
srcCopyFlagscontainsADDRESS_COPY_SPARSE_BIT_KHR, the source memory regions accessed must be bound to memory
-
copyCountmust be less than or equal tocopyAddressRange.size/copyAddressRange.stride -
copyAddressRange.addressmust be 4 byte aligned -
copyAddressRange.stridemust be a multiple of4and must be greater than or equal to sizeof(CopyMemoryToImageIndirectCommandKHR) - The format
features of
dstImagemust containFORMAT_FEATURE_2_COPY_IMAGE_INDIRECT_DST_BIT_KHR -
copyAddressRangemust be a device address range allocated to the application from a buffer created with theBUFFER_USAGE_INDIRECT_BUFFER_BITusage flag set -
dstImagemust not be a protected image - The
aspectMaskmember for every subresource inpImageSubresourcesmust only have a single bit set - The
aspectMaskmember for every subresource inpImageSubresourcesmust specify an aspect present indstImage -
dstImagemust have been created with theIMAGE_USAGE_TRANSFER_DST_BITusage flag set - If
dstImageis non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a singleDeviceMemoryobject -
dstImagemust have a sample count equal toSAMPLE_COUNT_1_BIT -
dstImageLayoutmust specify the layout of the image subresources ofdstImageat the time this command is executed on aDevice -
dstImageLayoutmust beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,IMAGE_LAYOUT_SHARED_PRESENT_KHR, orIMAGE_LAYOUT_GENERAL - The
specified
mipLevelof each region inpImageSubresourcesmust be less than themipLevelsspecified inImageCreateInfowhendstImagewas created - If
dstImageis not of typeIMAGE_TYPE_3D, and the specifiedlayerCountof each region inpImageSubresourcesis notREMAINING_ARRAY_LAYERS, the specifiedbaseArrayLayer+layerCountof each region inpImageSubresourcesmust be less than or equal to thearrayLayersspecified inImageCreateInfowhendstImagewas created - If
dstImageis of typeIMAGE_TYPE_3D, and the specifiedlayerCountof each region inpImageSubresourcesis notREMAINING_ARRAY_LAYERS, for each destination region, (imageSubresource.baseArrayLayer+imageSubresource.layerCount) must be less than or equal to the depth of the specified subresource - If
dstImageis of typeIMAGE_TYPE_3D, and the specifiedlayerCountof each region inpImageSubresourcesis notREMAINING_ARRAY_LAYERS, for each destination region, if (imageSubresource.baseArrayLayer+imageSubresource.layerCount) does not equal the depth of the specified subresource,imageSubresource.layerCountmust be a multiple of the texel block extent depth of theFormatofdstImage - If
dstImageis of typeIMAGE_TYPE_3D, for each destination region,imageSubresource.baseArrayLayermust be a multiple of the texel block extent depth of theFormatofdstImage - If
dstImageis of typeIMAGE_TYPE_3D, for each destination region,imageSubresource.baseArrayLayermust be less than or equal to the depth of the specified subresource -
dstImagemust not have been created withflagscontainingIMAGE_CREATE_SUBSAMPLED_BIT_EXT - If the
queue family used to create the
CommandPoolwhichcommandBufferwas allocated from does not supportQUEUE_GRAPHICS_BIT, for each region, theaspectMaskmember ofpImageSubresourcesmust not beIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BIT - The format
features of
dstImagemust containFORMAT_FEATURE_TRANSFER_DST_BIT - Any
of the source or destination memory regions specified in
copyAddressRangemust not overlap with any of the specified destination memory regions at the time this command is executed on device
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INDIRECT_INFO_KHR
-
pNextmust beNULL -
srcCopyFlagsmust be a valid combination ofAddressCopyFlagBitsKHRvalues -
dstImagemust be a validImagehandle -
dstImageLayoutmust be a validImageLayoutvalue -
pImageSubresourcesmust be a valid pointer to an array ofcopyCountvalidImageSubresourceLayersstructures -
copyCountmust be greater than0
See Also
VK_KHR_copy_memory_indirect,
AddressCopyFlagsKHR, Image,
ImageLayout,
ImageSubresourceLayers,
StridedDeviceAddressRangeKHR,
StructureType,
cmdCopyMemoryToImageIndirectKHR
Constructors
| CopyMemoryToImageIndirectInfoKHR | |
Fields
| |
Instances
| Show CopyMemoryToImageIndirectInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect Methods showsPrec :: Int -> CopyMemoryToImageIndirectInfoKHR -> ShowS # | |
| FromCStruct CopyMemoryToImageIndirectInfoKHR Source # | |
| ToCStruct CopyMemoryToImageIndirectInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect Methods withCStruct :: CopyMemoryToImageIndirectInfoKHR -> (Ptr CopyMemoryToImageIndirectInfoKHR -> IO b) -> IO b Source # pokeCStruct :: Ptr CopyMemoryToImageIndirectInfoKHR -> CopyMemoryToImageIndirectInfoKHR -> IO b -> IO b Source # withZeroCStruct :: (Ptr CopyMemoryToImageIndirectInfoKHR -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr CopyMemoryToImageIndirectInfoKHR -> IO b -> IO b Source # cStructSize :: Int Source # | |
| Zero CopyMemoryToImageIndirectInfoKHR Source # | |
Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect Methods | |
data PhysicalDeviceCopyMemoryIndirectFeaturesKHR Source #
VkPhysicalDeviceCopyMemoryIndirectFeaturesKHR - Structure describing indirect copy features supported by an implementation
Members
This structure describes the following features:
Description
If the PhysicalDeviceCopyMemoryIndirectFeaturesKHR 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. If the application wishes to use a
Device with any features described by
PhysicalDeviceCopyMemoryIndirectFeaturesKHR, it must add an instance
of the structure, with the desired feature members set to
TRUE, to the pNext chain of
DeviceCreateInfo when creating the
Device.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceCopyMemoryIndirectFeaturesKHR | |
Fields
| |
Instances
data PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source #
VkPhysicalDeviceCopyMemoryIndirectPropertiesKHR - Structure describing supported queues for indirect copy
Description
If the
indirectMemoryCopy
or
indirectMemoryToImageCopy
feature is supported, supportedQueues must return at least one
supported queue type.
If the PhysicalDeviceCopyMemoryIndirectPropertiesKHR structure is
included in the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
VK_KHR_copy_memory_indirect,
VK_NV_copy_memory_indirect,
QueueFlags,
StructureType
Constructors
| PhysicalDeviceCopyMemoryIndirectPropertiesKHR | |
Fields
| |
Instances
newtype AddressCopyFlagBitsKHR Source #
VkAddressCopyFlagBitsKHR - Bitmask specifying address copy parameters
Description
ADDRESS_COPY_DEVICE_LOCAL_BIT_KHRspecifies that the address range is expected to be resident in device local memory. Specifying this value is optional, but may lead to improved performance if set accurately.
ADDRESS_COPY_PROTECTED_BIT_KHRspecifies that the address range is allocated from protected memory.ADDRESS_COPY_SPARSE_BIT_KHRspecifies that the address range may not be fully bound to physical memory when accessed.
See Also
Constructors
| AddressCopyFlagBitsKHR Flags |
Bundled Patterns
| pattern ADDRESS_COPY_DEVICE_LOCAL_BIT_KHR :: AddressCopyFlagBitsKHR | |
| pattern ADDRESS_COPY_SPARSE_BIT_KHR :: AddressCopyFlagBitsKHR | |
| pattern ADDRESS_COPY_PROTECTED_BIT_KHR :: AddressCopyFlagBitsKHR |
Instances
type KHR_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1 Source #
pattern KHR_COPY_MEMORY_INDIRECT_SPEC_VERSION :: Integral a => a Source #
type KHR_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_KHR_copy_memory_indirect" Source #
pattern KHR_COPY_MEMORY_INDIRECT_EXTENSION_NAME :: (Eq a, IsString a) => a Source #