Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class NVCopyMemoryIndirect

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

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.
VK_NV_copy_memory_indirect
Name String
VK_NV_copy_memory_indirect
Extension Type
Device extension
Registered Extension Number
427
Revision
1
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2 and VK_KHR_buffer_device_address
Contact
Other Extension Metadata
Last Modified Date
2022-10-14
Contributors
  • Vikram Kushwaha, NVIDIA
  • Jeff Bolz, NVIDIA
  • Christoph Kubisch, NVIDIA
  • Daniel Koch, NVIDIA

Field Summary

Modifier and TypeField and Description
public static final String
public static final int
VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION

The extension specification version.

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, long copyBufferAddress, int
the number of copies to execute, and can be zero.
copyCount
,
int stride, long dstImage, int dstImageLayout, long pImageSubresources)

Unsafe version of: CmdCopyMemoryToImageIndirectNV

public static void
vkCmdCopyMemoryIndirectNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
long
the buffer address specifying the copy parameters. This buffer is laid out in memory as an array of VkCopyMemoryIndirectCommandNV structures.
copyBufferAddress
,
int
the number of copies to execute, and can be zero.
copyCount
,
int
the stride in bytes between successive sets of copy parameters.
stride
)

Copy data between memory regions.

public static void
vkCmdCopyMemoryToImageIndirectNV(VkCommandBuffer
the command buffer into which the command will be recorded.
commandBuffer
,
long
the buffer address specifying the copy parameters. This buffer is laid out in memory as an array of VkCopyMemoryToImageIndirectCommandNV structures.
copyBufferAddress
,
int
the byte stride between successive sets of copy parameters.
stride
,
long
the destination image.
dstImage
,
int
the layout of the destination image subresources for the copy.
dstImageLayout
,
VkImageSubresourceLayers.Buffer
a pointer to an array of size copyCount of VkImageSubresourceLayers used to specify the specific image subresource of the destination image data for that copy.
pImageSubresources
)

Copy data from a memory region into an image.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAMEback to summary
public static final String VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME

The extension name.

VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSIONback to summary
public static final int VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION

The extension specification version.

VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NVback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV

Extends VkStructureType.

Enum values:
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NVback to summary
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV

Extends VkStructureType.

Enum values:

Constructor Detail

NVCopyMemoryIndirectback to summary
protected NVCopyMemoryIndirect()

Method Detail

nvkCmdCopyMemoryToImageIndirectNVback to summary
public static void nvkCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, long copyBufferAddress, int copyCount, int stride, long dstImage, int dstImageLayout, long pImageSubresources)

Unsafe version of: CmdCopyMemoryToImageIndirectNV

Parameters
copyCount:int

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

vkCmdCopyMemoryIndirectNVback to summary
public static void vkCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, long copyBufferAddress, int copyCount, int stride)

Copy data between memory regions.

C Specification

To copy data between two memory regions by specifying copy parameters indirectly in a buffer, call:


void vkCmdCopyMemoryIndirectNV(
    VkCommandBuffer                             commandBuffer,
    VkDeviceAddress                             copyBufferAddress,
    uint32_t                                    copyCount,
    uint32_t                                    stride);
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
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations
  • This command must only be called outside of a render pass instance
  • This command must only be called outside of a video coding scope
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryOutsideOutsideTransfer Graphics ComputeAction
Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

copyBufferAddress:long

the buffer address specifying the copy parameters. This buffer is laid out in memory as an array of VkCopyMemoryIndirectCommandNV structures.

copyCount:int

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

stride:int

the stride in bytes between successive sets of copy parameters.

vkCmdCopyMemoryToImageIndirectNVback to summary
public static void vkCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, long copyBufferAddress, int stride, long dstImage, int dstImageLayout, VkImageSubresourceLayers.Buffer pImageSubresources)

Copy data from a memory region into an image.

C Specification

To copy data from a memory region to an image object by specifying copy parameters in a buffer, call:


void vkCmdCopyMemoryToImageIndirectNV(
    VkCommandBuffer                             commandBuffer,
    VkDeviceAddress                             copyBufferAddress,
    uint32_t                                    copyCount,
    uint32_t                                    stride,
    VkImage                                     dstImage,
    VkImageLayout                               dstImageLayout,
    const VkImageSubresourceLayers*             pImageSubresources);
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. The copy must be performed on a queue that supports indirect copy operations, see VkPhysicalDeviceCopyMemoryIndirectPropertiesNV.

Valid Usage
  • The indirectCopy feature must be enabled
  • dstImage must not be a protected image
  • The aspectMask member for every subresource in pImageSubresources must only have a single bit set
  • The image region specified by each element in copyBufferAddress must be a region that is contained within dstImage
  • dstImage must have been created with IMAGE_USAGE_TRANSFER_DST_BIT usage flag
  • If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object
Valid Usage (Implicit)
  • commandBuffer must be a valid VkCommandBuffer handle
  • dstImage must be a valid VkImage handle
  • dstImageLayout must be a valid VkImageLayout value
  • pImageSubresources must be a valid pointer to an array of copyCount valid VkImageSubresourceLayers structures
  • commandBuffer must be in the recording state
  • The VkCommandPool that commandBuffer was allocated from must support transfer, graphics, or compute operations
  • This command must only be called outside of a render pass instance
  • 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 VkDevice
Host Synchronization
  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryOutsideOutsideTransfer Graphics ComputeAction
See Also

VkImageSubresourceLayers

Parameters
commandBuffer:VkCommandBuffer

the command buffer into which the command will be recorded.

copyBufferAddress:long

the buffer address specifying the copy parameters. This buffer is laid out in memory as an array of VkCopyMemoryToImageIndirectCommandNV structures.

stride:int

the byte stride between successive sets of copy parameters.

dstImage:long

the destination image.

dstImageLayout:int

the layout of the destination image subresources for the copy.

pImageSubresources:VkImageSubresourceLayers.Buffer

a pointer to an array of size copyCount of VkImageSubresourceLayers used to specify the specific image subresource of the destination image data for that copy.