| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_NV_copy_memory_indirect
Description
Name
VK_NV_copy_memory_indirect - device extension
VK_NV_copy_memory_indirect
- Name String
VK_NV_copy_memory_indirect
- Extension Type
- Device extension
- Registered Extension Number
- 427
- Revision
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 or
VK_KHR_buffer_device_address or Vulkan Version 1.2
- Deprecation State
- Promoted to VK_KHR_copy_memory_indirect extension
- Contact
Other Extension Metadata
- Last Modified Date
- 2022-10-14
- Contributors
- Vikram Kushwaha, NVIDIA
- Jeff Bolz, NVIDIA
- Christoph Kubisch, NVIDIA
- Daniel Koch, NVIDIA
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
CopyMemoryToImageIndirectCommandNVExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enum Constants
Version History
Revision 1, 2022-10-14 (Vikram Kushwaha)
- Initial draft
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
- cmdCopyMemoryIndirectNV :: MonadIO io => CommandBuffer -> ("copyBufferAddress" ::: DeviceAddress) -> ("copyCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- cmdCopyMemoryToImageIndirectNV :: MonadIO io => CommandBuffer -> ("copyBufferAddress" ::: DeviceAddress) -> ("stride" ::: Word32) -> ("dstImage" ::: Image) -> ("dstImageLayout" ::: ImageLayout) -> ("imageSubresources" ::: Vector ImageSubresourceLayers) -> io ()
- pattern STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV :: StructureType
- data PhysicalDeviceCopyMemoryIndirectFeaturesNV = PhysicalDeviceCopyMemoryIndirectFeaturesNV {
- indirectCopy :: Bool
- type CopyMemoryIndirectCommandNV = CopyMemoryIndirectCommandKHR
- type CopyMemoryToImageIndirectCommandNV = CopyMemoryToImageIndirectCommandKHR
- type PhysicalDeviceCopyMemoryIndirectPropertiesNV = PhysicalDeviceCopyMemoryIndirectPropertiesKHR
- type NV_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1
- pattern NV_COPY_MEMORY_INDIRECT_SPEC_VERSION :: Integral a => a
- type NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect"
- pattern NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME :: (Eq a, IsString a) => a
- data CopyMemoryIndirectCommandKHR = CopyMemoryIndirectCommandKHR {}
- data CopyMemoryToImageIndirectCommandKHR = CopyMemoryToImageIndirectCommandKHR {}
- data PhysicalDeviceCopyMemoryIndirectPropertiesKHR = PhysicalDeviceCopyMemoryIndirectPropertiesKHR {}
Documentation
cmdCopyMemoryIndirectNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> ("copyBufferAddress" ::: DeviceAddress) |
|
| -> ("copyCount" ::: Word32) |
|
| -> ("stride" ::: Word32) |
|
| -> io () |
vkCmdCopyMemoryIndirectNV - Copy data between memory regions
Description
Each region read from copyBufferAddress 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 indirectCopy feature must be enabled
-
copyBufferAddressmust be 4 byte aligned -
stridemust be a multiple of4and must be greater than or equal to sizeof(CopyMemoryIndirectCommandNV) - The
CommandPoolthatcommandBufferwas allocated from must support at least one of the queue types specified inPhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues - Any of the
source or destination memory regions specified in
copyBufferAddressmust not overlap with any of the specified destination memory regions
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
copyBufferAddressmust be a validDeviceAddressvalue -
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
vkCmdCopyMemoryIndirectNV is not affected by conditional rendering
See Also
cmdCopyMemoryToImageIndirectNV Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> ("copyBufferAddress" ::: DeviceAddress) |
|
| -> ("stride" ::: Word32) |
|
| -> ("dstImage" ::: Image) |
|
| -> ("dstImageLayout" ::: ImageLayout) |
|
| -> ("imageSubresources" ::: Vector ImageSubresourceLayers) |
|
| -> io () |
vkCmdCopyMemoryToImageIndirectNV - Copy data from a memory region to an image object
Description
Each region in copyBufferAddress is copied from the source memory
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.
Valid Usage
- The indirectCopy feature must be enabled
-
copyBufferAddressmust be 4 byte aligned -
stridemust be a multiple of4and must be greater than or equal to sizeof(CopyMemoryToImageIndirectCommandNV) - The
CommandPoolthatcommandBufferwas allocated from must support at least one of the queue types specified inPhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues -
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
copyBufferAddressmust not overlap with any of the specified destination memory regions at the time this command is executed on device
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
copyBufferAddressmust be a validDeviceAddressvalue -
dstImagemust be a validImagehandle -
dstImageLayoutmust be a validImageLayoutvalue -
pImageSubresourcesmust be a valid pointer to an array ofcopyCountvalidImageSubresourceLayersstructures -
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
-
copyCountmust be greater than0 - Both of
commandBuffer, anddstImagemust have been created, allocated, or retrieved from the sameDevice
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
vkCmdCopyMemoryToImageIndirectNV is not affected by conditional rendering
See Also
VK_NV_copy_memory_indirect,
CommandBuffer,
DeviceAddress,
Image,
ImageLayout,
ImageSubresourceLayers
data PhysicalDeviceCopyMemoryIndirectFeaturesNV Source #
VkPhysicalDeviceCopyMemoryIndirectFeaturesNV - Structure describing indirect copy features supported by an implementation
Members
This structure describes the following features:
Description
If the PhysicalDeviceCopyMemoryIndirectFeaturesNV 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
PhysicalDeviceCopyMemoryIndirectFeaturesNV, 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
| PhysicalDeviceCopyMemoryIndirectFeaturesNV | |
Fields
| |
Instances
type PhysicalDeviceCopyMemoryIndirectPropertiesNV = PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source #
type NV_COPY_MEMORY_INDIRECT_SPEC_VERSION = 1 Source #
pattern NV_COPY_MEMORY_INDIRECT_SPEC_VERSION :: Integral a => a Source #
type NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect" Source #
pattern NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME :: (Eq a, IsString a) => a Source #
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 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 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
| |