vulkan
Safe HaskellNone
LanguageHaskell2010

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

Vulkan Version 1.1      and

VK_KHR_buffer_device_address or Vulkan Version 1.2

Deprecation State
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

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

Documentation

cmdCopyMemoryIndirectNV Source #

Arguments

:: MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded.

-> ("copyBufferAddress" ::: DeviceAddress)

copyBufferAddress is the memory address specifying the copy parameters. It is laid out as an array of CopyMemoryIndirectCommandNV structures.

-> ("copyCount" ::: Word32)

copyCount is the number of copies to execute, and can be zero.

-> ("stride" ::: Word32)

stride is the stride in bytes between successive sets of copy parameters.

-> 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

  • copyBufferAddress must be 4 byte aligned
  • stride must be a multiple of 4 and must be greater than or equal to sizeof(CopyMemoryIndirectCommandNV)
  • The CommandPool that commandBuffer was allocated from must support at least one of the queue types specified in PhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues
  • Any of the source or destination memory regions specified in copyBufferAddress must not overlap with any of the specified destination memory regions

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary Secondary Outside Outside VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BITAction

Conditional Rendering

vkCmdCopyMemoryIndirectNV is not affected by conditional rendering

See Also

VK_NV_copy_memory_indirect, CommandBuffer, DeviceAddress

cmdCopyMemoryToImageIndirectNV Source #

Arguments

:: MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded.

-> ("copyBufferAddress" ::: DeviceAddress)

copyBufferAddress is the address specifying the copy parameters which are laid out in memory as an array of CopyMemoryToImageIndirectCommandNV structures.

-> ("stride" ::: Word32)

stride is the byte stride between successive sets of copy parameters.

-> ("dstImage" ::: Image)

dstImage is the destination image.

-> ("dstImageLayout" ::: ImageLayout)

dstImageLayout is the layout of the destination image subresources for the copy.

-> ("imageSubresources" ::: Vector ImageSubresourceLayers)

pImageSubresources is a pointer to an array of copyCount ImageSubresourceLayers structures, specifying the image subresources of the destination image data for the copy operation.

-> 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

  • copyBufferAddress must be 4 byte aligned
  • stride must be a multiple of 4 and must be greater than or equal to sizeof(CopyMemoryToImageIndirectCommandNV)
  • The CommandPool that commandBuffer was allocated from must support at least one of the queue types specified in PhysicalDeviceCopyMemoryIndirectPropertiesKHR::supportedQueues
  • dstImage must not be a protected image
  • The aspectMask member for every subresource in pImageSubresources must only have a single bit set
  • The aspectMask member for every subresource in pImageSubresources must specify an aspect present in dstImage
  • dstImage must have been created with the IMAGE_USAGE_TRANSFER_DST_BIT usage flag set
  • If dstImage is non-sparse then the image or each specified disjoint plane must be bound completely and contiguously to a single DeviceMemory object
  • dstImage must have a sample count equal to SAMPLE_COUNT_1_BIT
  • dstImageLayout must specify the layout of the image subresources of dstImage at the time this command is executed on a Device
  • dstImageLayout must be IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, IMAGE_LAYOUT_SHARED_PRESENT_KHR, or IMAGE_LAYOUT_GENERAL
  • The specified mipLevel of each region in pImageSubresources must be less than the mipLevels specified in ImageCreateInfo when dstImage was created
  • If dstImage is not of type IMAGE_TYPE_3D, and the specified layerCount of each region in pImageSubresources is not REMAINING_ARRAY_LAYERS, the specified baseArrayLayer + layerCount of each region in pImageSubresources must be less than or equal to the arrayLayers specified in ImageCreateInfo when dstImage was created
  • If dstImage is of type IMAGE_TYPE_3D, and the specified layerCount of each region in pImageSubresources is not REMAINING_ARRAY_LAYERS, for each destination region, (imageSubresource.baseArrayLayer + imageSubresource.layerCount) must be less than or equal to the depth of the specified subresource
  • If dstImage is of type IMAGE_TYPE_3D, and the specified layerCount of each region in pImageSubresources is not REMAINING_ARRAY_LAYERS, for each destination region, if (imageSubresource.baseArrayLayer + imageSubresource.layerCount) does not equal the depth of the specified subresource, imageSubresource.layerCount must be a multiple of the texel block extent depth of the Format of dstImage
  • If dstImage is of type IMAGE_TYPE_3D, for each destination region, imageSubresource.baseArrayLayer must be a multiple of the texel block extent depth of the Format of dstImage
  • If dstImage is of type IMAGE_TYPE_3D, for each destination region, imageSubresource.baseArrayLayer must be less than or equal to the depth of the specified subresource
  • dstImage must not have been created with flags containing IMAGE_CREATE_SUBSAMPLED_BIT_EXT
  • If the queue family used to create the CommandPool which commandBuffer was allocated from does not support QUEUE_GRAPHICS_BIT, for each region, the aspectMask member of pImageSubresources must not be IMAGE_ASPECT_DEPTH_BIT or IMAGE_ASPECT_STENCIL_BIT
  • The format features of dstImage must contain FORMAT_FEATURE_TRANSFER_DST_BIT
  • Any of the source or destination memory regions specified in copyBufferAddress must not overlap with any of the specified destination memory regions at the time this command is executed on device

Valid Usage (Implicit)

  • copyBufferAddress must be a valid DeviceAddress value
  • dstImage must be a valid Image handle
  • dstImageLayout must be a valid ImageLayout value
  • pImageSubresources must be a valid pointer to an array of copyCount valid ImageSubresourceLayers structures
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, QUEUE_GRAPHICS_BIT, or QUEUE_TRANSFER_BIT operations
  • 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
  • copyCount must be greater than 0
  • Both of commandBuffer, and dstImage must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary Secondary Outside Outside VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_TRANSFER_BITAction

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

VK_NV_copy_memory_indirect, Bool32, StructureType

Instances

Instances details
Eq PhysicalDeviceCopyMemoryIndirectFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_copy_memory_indirect

Storable PhysicalDeviceCopyMemoryIndirectFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_copy_memory_indirect

Show PhysicalDeviceCopyMemoryIndirectFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_copy_memory_indirect

FromCStruct PhysicalDeviceCopyMemoryIndirectFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_copy_memory_indirect

ToCStruct PhysicalDeviceCopyMemoryIndirectFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_copy_memory_indirect

Zero PhysicalDeviceCopyMemoryIndirectFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_copy_memory_indirect

type NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME = "VK_NV_copy_memory_indirect" Source #

data CopyMemoryIndirectCommandKHR Source #

VkCopyMemoryIndirectCommandKHR - Structure specifying indirect memory region copy operation

Valid Usage

  • The srcAddress must be 4 byte aligned
  • The dstAddress must be 4 byte aligned
  • The size must be 4 byte aligned
  • The memory in range [srcAddress, srcAddress + size - 1] must be within the bounds of the memory allocation backing srcAddress
  • The memory in range [dstAddress, dstAddress + size - 1] must be within the bounds of the memory allocation backing dstAddress
  • The range of memory defined by srcAddress and size must be a device address range allocated to the application from a buffer created with the BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set
  • The range of memory defined by dstAddress and size must be a device address range allocated to the application from a buffer created with the BUFFER_USAGE_TRANSFER_DST_BIT usage flag set

Valid Usage (Implicit)

See Also

VK_KHR_copy_memory_indirect, VK_NV_copy_memory_indirect, DeviceAddress, DeviceSize

Constructors

CopyMemoryIndirectCommandKHR 

Fields

Instances

Instances details
Eq CopyMemoryIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Storable CopyMemoryIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Show CopyMemoryIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

FromCStruct CopyMemoryIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

ToCStruct CopyMemoryIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Zero CopyMemoryIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

data CopyMemoryToImageIndirectCommandKHR Source #

VkCopyMemoryToImageIndirectCommandKHR - Structure specifying indirect memory region to image copy operation

Valid Usage

  • The srcAddress must be 4 byte aligned
  • If dstImage does not have either a depth/stencil format or a multi-planar format, srcAddress must be a multiple of the texel block size
  • If dstImage has a multi-planar format, srcAddress must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in ???
  • bufferRowLength must be 0, or greater than or equal to the width member of imageExtent
  • bufferImageHeight must be 0, or greater than or equal to the height member of imageExtent
  • imageOffset must specify a valid offset in the destination image
  • imageExtent must specify a valid region in the destination image and can be 0
  • The memory region starting at srcAddress and described by bufferRowLength and bufferImageHeight must not exceed the bounds of the memory allocation backing memory at srcAddress
  • The imageOffset and imageExtent members of each region must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in QueueFamilyProperties
  • For each destination region, imageOffset.x and (imageExtent.width + imageOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified subresource
  • For each destination region, imageOffset.y and (imageExtent.height + imageOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified subresource
  • The members of imageSubresource must be identical to the members of the ImageSubresourceLayers structure specified in the corresponding index of the pCopyMemoryToImageIndirectInfo->pImageSubresources array of cmdCopyMemoryToImageIndirectKHR during command recording
  • If dstImage is of type IMAGE_TYPE_1D, imageOffset.y must be 0 and imageExtent.height must be 1
  • If dstImage is of type IMAGE_TYPE_1D or IMAGE_TYPE_2D, imageOffset.z must be 0 and imageExtent.depth must be 1
  • srcAddress must be a device address allocated to the application from a buffer created with the BUFFER_USAGE_TRANSFER_SRC_BIT usage flag set

Valid Usage (Implicit)

See Also

VK_KHR_copy_memory_indirect, VK_NV_copy_memory_indirect, DeviceAddress, Extent3D, ImageSubresourceLayers, Offset3D

Constructors

CopyMemoryToImageIndirectCommandKHR 

Fields

  • srcAddress :: DeviceAddress

    srcAddress is the starting address of the source device memory to copy from.

  • bufferRowLength :: Word32

    bufferRowLength and bufferImageHeight specify in texels a subregion of a larger two- or three-dimensional image in buffer memory, and control the addressing calculations. If either of these values is zero, that aspect of the buffer memory is considered to be tightly packed according to the imageExtent.

  • bufferImageHeight :: Word32
     
  • imageSubresource :: ImageSubresourceLayers

    imageSubresource is a ImageSubresourceLayers structure used to specify the specific image subresources of the image used for the destination image data, which must match the value specified in corresponding index of the pCopyMemoryToImageIndirectInfo->pImageSubresources array of cmdCopyMemoryToImageIndirectKHR during command recording.

  • imageOffset :: Offset3D

    imageOffset selects the initial x, y, z offsets in texels of the sub-region of the destination image data.

  • imageExtent :: Extent3D

    imageExtent is the size in texels of the destination image in width, height and depth.

Instances

Instances details
Storable CopyMemoryToImageIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Show CopyMemoryToImageIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

FromCStruct CopyMemoryToImageIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

ToCStruct CopyMemoryToImageIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Zero CopyMemoryToImageIndirectCommandKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

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

Instances details
Eq PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Storable PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Show PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

FromCStruct PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

ToCStruct PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect

Zero PhysicalDeviceCopyMemoryIndirectPropertiesKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_copy_memory_indirect