Class NVCopyMemoryIndirect
- 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_properties2or Version 1.1 andVK_KHR_buffer_device_addressor Version 1.2- Contact
- Vikram Kushwaha vkushwaha-nv
Other Extension Metadata
- Last Modified Date
- 2022-10-14
- Contributors
- Vikram Kushwaha, NVIDIA
- Jeff Bolz, NVIDIA
- Christoph Kubisch, NVIDIA
- Daniel Koch, NVIDIA
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsVkStructureType.static final intExtendsVkStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidnvkCmdCopyMemoryToImageIndirectNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long copyBufferAddress, int copyCount, int stride, long dstImage, int dstImageLayout, long pImageSubresources) Unsafe version of:CmdCopyMemoryToImageIndirectNVstatic voidvkCmdCopyMemoryIndirectNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long copyBufferAddress, int copyCount, int stride) Copy data between memory regions.static voidvkCmdCopyMemoryToImageIndirectNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long copyBufferAddress, int stride, long dstImage, int dstImageLayout, VkImageSubresourceLayers.Buffer pImageSubresources) Copy data from a memory region into an image.
-
Field Details
-
VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSION
public static final int VK_NV_COPY_MEMORY_INDIRECT_SPEC_VERSIONThe extension specification version.- See Also:
-
VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME
The extension name.- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NV
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_FEATURES_NVExtendsVkStructureType.Enum values:
- See Also:
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NV
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COPY_MEMORY_INDIRECT_PROPERTIES_NVExtendsVkStructureType.Enum values:
- See Also:
-
-
Method Details
-
vkCmdCopyMemoryIndirectNV
public static void vkCmdCopyMemoryIndirectNV(org.lwjgl.vulkan.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
copyBufferAddressis 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
indirectCopyfeature must be enabled copyBufferAddressmust be 4 byte alignedstridemust be a multiple of 4 and must be greater than or equal to sizeof(VkCopyMemoryIndirectCommandNV)- The
VkCommandPoolthatcommandBufferwas allocated from must support at least one of theVkPhysicalDeviceCopyMemoryIndirectPropertiesNV::supportedQueues
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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 Transfer Graphics Compute Action - Parameters:
commandBuffer- the command buffer into which the command will be recorded.copyBufferAddress- the buffer address specifying the copy parameters. This buffer is laid out in memory as an array ofVkCopyMemoryIndirectCommandNVstructures.copyCount- the number of copies to execute, and can be zero.stride- the stride in bytes between successive sets of copy parameters.
- The
-
nvkCmdCopyMemoryToImageIndirectNV
public static void nvkCmdCopyMemoryToImageIndirectNV(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long copyBufferAddress, int copyCount, int stride, long dstImage, int dstImageLayout, long pImageSubresources) Unsafe version of:CmdCopyMemoryToImageIndirectNV- Parameters:
copyCount- the number of copies to execute, and can be zero.
-
vkCmdCopyMemoryToImageIndirectNV
public static void vkCmdCopyMemoryToImageIndirectNV(org.lwjgl.vulkan.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
copyBufferAddressis copied from the source memory region to an image region in the destination image. If the destination image is of typeIMAGE_TYPE_3D, the starting slice and number of slices to copy are specified inpImageSubresources→baseArrayLayerandpImageSubresources→layerCountrespectively. The copy must be performed on a queue that supports indirect copy operations, seeVkPhysicalDeviceCopyMemoryIndirectPropertiesNV.Valid Usage
- The
indirectCopyfeature must be enabled dstImagemust not be a protected image- The
aspectMaskmember for every subresource inpImageSubresourcesmust only have a single bit set - The image region specified by each element in
copyBufferAddressmust be a region that is contained withindstImage dstImagemust have been created withIMAGE_USAGE_TRANSFER_DST_BITusage flag- If
dstImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
dstImagemust have a sample count equal toSAMPLE_COUNT_1_BITdstImageLayoutmust specify the layout of the image subresources ofdstImageat the time this command is executed on aVkDevicedstImageLayoutmust beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,IMAGE_LAYOUT_SHARED_PRESENT_KHR, orIMAGE_LAYOUT_GENERAL- The specified
mipLevelof each region must be less than themipLevelsspecified inVkImageCreateInfowhendstImagewas created - If
layerCountis notREMAINING_ARRAY_LAYERS, the specifiedbaseArrayLayer+layerCountof each region must be less than or equal to thearrayLayersspecified inVkImageCreateInfowhendstImagewas created - The
imageOffsetandimageExtentmembers of each region must respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties dstImagemust not have been created withflagscontainingIMAGE_CREATE_SUBSAMPLED_BIT_EXT- If the queue family used to create the
VkCommandPoolwhichcommandBufferwas allocated from does not supportQUEUE_GRAPHICS_BIT, for each region, theaspectMaskmember ofpImageSubresourcesmust not beIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BIT - For each region in
copyBufferAddress,imageOffset.yand(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 offsetmust be 4 byte alignedstridemust be a multiple of 4 and must be greater than or equal to sizeof(VkCopyMemoryToImageIndirectCommandNV)
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandledstImagemust be a validVkImagehandledstImageLayoutmust be a validVkImageLayoutvaluepImageSubresourcesmust be a valid pointer to an array ofcopyCountvalidVkImageSubresourceLayersstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas 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
copyCountmust be greater than 0- Both of
commandBuffer, anddstImagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas 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 Transfer Graphics Compute Action See Also
- Parameters:
commandBuffer- the command buffer into which the command will be recorded.copyBufferAddress- the buffer address specifying the copy parameters. This buffer is laid out in memory as an array ofVkCopyMemoryToImageIndirectCommandNVstructures.stride- the byte stride between successive sets of copy parameters.dstImage- the destination image.dstImageLayout- the layout of the destination image subresources for the copy.pImageSubresources- a pointer to an array of sizecopyCountofVkImageSubresourceLayersused to specify the specific image subresource of the destination image data for that copy.
- The
-