Class VkCopyImageInfo2

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkCopyImageInfo2>
org.lwjgl.vulkan.VkCopyImageInfo2
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkCopyImageInfo2KHR

public class VkCopyImageInfo2 extends org.lwjgl.system.Struct<VkCopyImageInfo2> implements org.lwjgl.system.NativeResource
Structure specifying parameters of an image copy command.
Valid Usage
  • The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory
  • The format features of srcImage must contain FORMAT_FEATURE_TRANSFER_SRC_BIT
  • srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice
  • srcImageLayout must be IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, IMAGE_LAYOUT_GENERAL, or IMAGE_LAYOUT_SHARED_PRESENT_KHR
  • The format features of dstImage must contain FORMAT_FEATURE_TRANSFER_DST_BIT
  • dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice
  • dstImageLayout must be IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, IMAGE_LAYOUT_GENERAL, or IMAGE_LAYOUT_SHARED_PRESENT_KHR
  • If the VkFormat of each of srcImage and dstImage is not a multi-planar format, the VkFormat of each of srcImage and dstImage must be size-compatible
  • In a copy to or from a plane of a multi-planar image, the VkFormat of the image and plane must be compatible according to the description of compatible planes for the plane being copied
  • The sample count of srcImage and dstImage must match
  • The srcOffset and extent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties
  • The dstOffset and extent members of each element of pRegions must respect the image transfer granularity requirements of commandBuffer’s command pool’s queue family, as described in VkQueueFamilyProperties
  • If neither srcImage nor dstImage has a multi-planar image format then for each element of pRegions, srcSubresource.aspectMask and dstSubresource.aspectMask must match
  • If srcImage has a multi-planar image format, then for each element of pRegions, srcSubresource.aspectMask must be a single valid multi-planar aspect mask bit
  • If dstImage has a multi-planar image format, then for each element of pRegions, dstSubresource.aspectMask must be a single valid multi-planar aspect mask bit
  • If srcImage has a multi-planar image format and the dstImage does not have a multi-planar image format, then for each element of pRegions, dstSubresource.aspectMask must be IMAGE_ASPECT_COLOR_BIT
  • If dstImage has a multi-planar image format and the srcImage does not have a multi-planar image format, then for each element of pRegions, srcSubresource.aspectMask must be IMAGE_ASPECT_COLOR_BIT
  • If the VK_KHR_maintenance1 extension is not enabled, VkPhysicalDeviceProperties::apiVersion is less than Vulkan 1.1, and either srcImage or dstImage is of type IMAGE_TYPE_3D, then for each element of pRegions, srcSubresource.baseArrayLayer and dstSubresource.baseArrayLayer must each be 0, and srcSubresource.layerCount and dstSubresource.layerCount must each be 1
  • If srcImage is of type IMAGE_TYPE_3D, then for each element of pRegions, srcSubresource.baseArrayLayer must be 0 and srcSubresource.layerCount must be 1
  • If dstImage is of type IMAGE_TYPE_3D, then for each element of pRegions, dstSubresource.baseArrayLayer must be 0 and dstSubresource.layerCount must be 1
  • For each element of pRegions, srcSubresource.aspectMask must specify aspects present in srcImage
  • For each element of pRegions, dstSubresource.aspectMask must specify aspects present in dstImage
  • For each element of pRegions, srcOffset.x and (extent.width + srcOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified srcSubresource of srcImage
  • For each element of pRegions, srcOffset.y and (extent.height + srcOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified srcSubresource of srcImage
  • If srcImage is of type IMAGE_TYPE_1D, then for each element of pRegions, srcOffset.y must be 0 and extent.height must be 1
  • If srcImage is of type IMAGE_TYPE_3D, then for each element of pRegions, srcOffset.z and (extent.depth + srcOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified srcSubresource of srcImage
  • If srcImage is of type IMAGE_TYPE_1D, then for each element of pRegions, srcOffset.z must be 0 and extent.depth must be 1
  • If dstImage is of type IMAGE_TYPE_1D, then for each element of pRegions, dstOffset.z must be 0 and extent.depth must be 1
  • If srcImage is of type IMAGE_TYPE_2D, then for each element of pRegions, srcOffset.z must be 0
  • If dstImage is of type IMAGE_TYPE_2D, then for each element of pRegions, dstOffset.z must be 0
  • If the VK_KHR_maintenance1 extension is not enabled, VkPhysicalDeviceProperties::apiVersion is less than Vulkan 1.1, srcImage and dstImage must have the same VkImageType
  • If the VK_KHR_maintenance1 extension is not enabled, VkPhysicalDeviceProperties::apiVersion is less than Vulkan 1.1, and srcImage or dstImage is of type IMAGE_TYPE_2D, then for each element of pRegions, extent.depth must be 1
  • If srcImage and dstImage have a different VkImageType, and maintenance5 is not enabled, one must be IMAGE_TYPE_3D and the other must be IMAGE_TYPE_2D
  • If the maintenance5 feature is not enabled, the layerCount member of srcSubresource or dstSubresource must not be REMAINING_ARRAY_LAYERS
  • If srcImage and dstImage have the same VkImageType, and neither of the layerCount members of srcSubresource or dstSubresource are REMAINING_ARRAY_LAYERS, the layerCount members must match
  • If srcImage and dstImage have the same VkImageType, and one of the layerCount members of srcSubresource or dstSubresource is REMAINING_ARRAY_LAYERS, the other member must be either REMAINING_ARRAY_LAYERS or equal to the arrayLayers member of the VkImageCreateInfo used to create the image minus baseArrayLayer
  • If srcImage and dstImage are both of type IMAGE_TYPE_2D, then for each element of pRegions, extent.depth must be 1
  • If srcImage is of type IMAGE_TYPE_2D, and dstImage is of type IMAGE_TYPE_3D, then for each element of pRegions, extent.depth must equal srcSubresource.layerCount
  • If dstImage is of type IMAGE_TYPE_2D, and srcImage is of type IMAGE_TYPE_3D, then for each element of pRegions, extent.depth must equal dstSubresource.layerCount
  • For each element of pRegions, dstOffset.x and (extent.width + dstOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified dstSubresource of dstImage
  • For each element of pRegions, dstOffset.y and (extent.height + dstOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified dstSubresource of dstImage
  • If dstImage is of type IMAGE_TYPE_1D, then for each element of pRegions, dstOffset.y must be 0 and extent.height must be 1
  • If dstImage is of type IMAGE_TYPE_3D, then for each element of pRegions, dstOffset.z and (extent.depth + dstOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified dstSubresource of dstImage
  • For each element of pRegions, srcOffset.x must be a multiple of the texel block extent width of the VkFormat of srcImage
  • For each element of pRegions, srcOffset.y must be a multiple of the texel block extent height of the VkFormat of srcImage
  • For each element of pRegions, srcOffset.z must be a multiple of the texel block extent depth of the VkFormat of srcImage
  • For each element of pRegions, dstOffset.x must be a multiple of the texel block extent width of the VkFormat of dstImage
  • For each element of pRegions, dstOffset.y must be a multiple of the texel block extent height of the VkFormat of dstImage
  • For each element of pRegions, dstOffset.z must be a multiple of the texel block extent depth of the VkFormat of dstImage
  • For each element of pRegions, if the sum of srcOffset.x and extent.width does not equal the width of the subresource specified by srcSubresource, extent.width must be a multiple of the texel block extent width of the VkFormat of srcImage
  • For each element of pRegions, if the sum of srcOffset.y and extent.height does not equal the height of the subresource specified by srcSubresource, extent.height must be a multiple of the texel block extent height of the VkFormat of srcImage
  • For each element of pRegions, if the sum of srcOffset.z and extent.depth does not equal the depth of the subresource specified by srcSubresource, extent.depth must be a multiple of the texel block extent depth of the VkFormat of srcImage
  • For each element of pRegions, if the sum of dstOffset.x and extent.width does not equal the width of the subresource specified by dstSubresource, extent.width must be a multiple of the texel block extent width of the VkFormat of dstImage
  • For each element of pRegions, if the sum of dstOffset.y and extent.height does not equal the height of the subresource specified by dstSubresource, extent.height must be a multiple of the texel block extent height of the VkFormat of dstImage
  • For each element of pRegions, if the sum of dstOffset.z and extent.depth does not equal the depth of the subresource specified by dstSubresource, extent.depth must be a multiple of the texel block extent depth of the VkFormat of dstImage
  • If the aspect member of any element of pRegions includes any flag other than IMAGE_ASPECT_STENCIL_BIT or srcImage was not created with separate stencil usage, IMAGE_USAGE_TRANSFER_SRC_BIT must have been included in the VkImageCreateInfo::usage used to create srcImage
  • If the aspect member of any element of pRegions includes any flag other than IMAGE_ASPECT_STENCIL_BIT or dstImage was not created with separate stencil usage, IMAGE_USAGE_TRANSFER_DST_BIT must have been included in the VkImageCreateInfo::usage used to create dstImage
  • If the aspect member of any element of pRegions includes IMAGE_ASPECT_STENCIL_BIT, and srcImage was created with separate stencil usage, IMAGE_USAGE_TRANSFER_SRC_BIT must have been included in the VkImageStencilUsageCreateInfo::stencilUsage used to create srcImage
  • If the aspect member of any element of pRegions includes IMAGE_ASPECT_STENCIL_BIT, and dstImage was created with separate stencil usage, IMAGE_USAGE_TRANSFER_DST_BIT must have been included in the VkImageStencilUsageCreateInfo::stencilUsage used to create dstImage
  • If srcImage is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a single VkDeviceMemory object
  • The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created
  • The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions , if srcSubresource.layerCount is not REMAINING_ARRAY_LAYERS and maintenance5 is not enabled, must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created
  • srcImage must not have been created with flags containing IMAGE_CREATE_SUBSAMPLED_BIT_EXT
  • If dstImage is non-sparse then the image or the specified disjoint plane must be bound completely and contiguously to a single VkDeviceMemory object
  • The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created
  • The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions , if dstSubresource.layerCount is not REMAINING_ARRAY_LAYERS and maintenance5 is not enabled, must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created
  • dstImage must not have been created with flags containing IMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_COPY_IMAGE_INFO_2
  • pNext must be NULL
  • srcImage must be a valid VkImage handle
  • srcImageLayout must be a valid VkImageLayout value
  • dstImage must be a valid VkImage handle
  • dstImageLayout must be a valid VkImageLayout value
  • pRegions must be a valid pointer to an array of regionCount valid VkImageCopy2 structures
  • regionCount must be greater than 0
  • Both of dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice
See Also

VkImageCopy2, CmdCopyImage2, CmdCopyImage2KHR

Layout


 struct VkCopyImageInfo2 {
     VkStructureType sType();
     void const * pNext();
     VkImage srcImage();
     VkImageLayout srcImageLayout();
     VkImage dstImage();
     VkImageLayout dstImageLayout();
     uint32_t regionCount();
     VkImageCopy2 const * pRegions();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • SRCIMAGE

      public static final int SRCIMAGE
      The struct member offsets.
    • SRCIMAGELAYOUT

      public static final int SRCIMAGELAYOUT
      The struct member offsets.
    • DSTIMAGE

      public static final int DSTIMAGE
      The struct member offsets.
    • DSTIMAGELAYOUT

      public static final int DSTIMAGELAYOUT
      The struct member offsets.
    • REGIONCOUNT

      public static final int REGIONCOUNT
      The struct member offsets.
    • PREGIONS

      public static final int PREGIONS
      The struct member offsets.
  • Constructor Details

    • VkCopyImageInfo2

      public VkCopyImageInfo2(ByteBuffer container)
      Creates a VkCopyImageInfo2 instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkCopyImageInfo2>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • srcImage

      public long srcImage()
      the source image.
    • srcImageLayout

      public int srcImageLayout()
      the current layout of the source image subresource.
    • dstImage

      public long dstImage()
      the destination image.
    • dstImageLayout

      public int dstImageLayout()
      the current layout of the destination image subresource.
    • regionCount

      public int regionCount()
      the number of regions to copy.
    • pRegions

      public VkImageCopy2.Buffer pRegions()
      a pointer to an array of VkImageCopy2 structures specifying the regions to copy.
    • sType

      public VkCopyImageInfo2 sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkCopyImageInfo2 sType$Default()
      Sets the STRUCTURE_TYPE_COPY_IMAGE_INFO_2 value to the sType() field.
    • pNext

      public VkCopyImageInfo2 pNext(long value)
      Sets the specified value to the pNext() field.
    • srcImage

      public VkCopyImageInfo2 srcImage(long value)
      Sets the specified value to the srcImage() field.
    • srcImageLayout

      public VkCopyImageInfo2 srcImageLayout(int value)
      Sets the specified value to the srcImageLayout() field.
    • dstImage

      public VkCopyImageInfo2 dstImage(long value)
      Sets the specified value to the dstImage() field.
    • dstImageLayout

      public VkCopyImageInfo2 dstImageLayout(int value)
      Sets the specified value to the dstImageLayout() field.
    • pRegions

      public VkCopyImageInfo2 pRegions(VkImageCopy2.Buffer value)
      Sets the address of the specified VkImageCopy2.Buffer to the pRegions() field.
    • set

      public VkCopyImageInfo2 set(int sType, long pNext, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageCopy2.Buffer pRegions)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static VkCopyImageInfo2 malloc()
      Returns a new VkCopyImageInfo2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkCopyImageInfo2 calloc()
      Returns a new VkCopyImageInfo2 instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkCopyImageInfo2 create()
      Returns a new VkCopyImageInfo2 instance allocated with BufferUtils.
    • create

      public static VkCopyImageInfo2 create(long address)
      Returns a new VkCopyImageInfo2 instance for the specified memory address.
    • createSafe

      @Nullable public static VkCopyImageInfo2 createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkCopyImageInfo2.Buffer malloc(int capacity)
      Returns a new VkCopyImageInfo2.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkCopyImageInfo2.Buffer calloc(int capacity)
      Returns a new VkCopyImageInfo2.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkCopyImageInfo2.Buffer create(int capacity)
      Returns a new VkCopyImageInfo2.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkCopyImageInfo2.Buffer create(long address, int capacity)
      Create a VkCopyImageInfo2.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static VkCopyImageInfo2.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkCopyImageInfo2 malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyImageInfo2 instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkCopyImageInfo2 calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyImageInfo2 instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VkCopyImageInfo2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyImageInfo2.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkCopyImageInfo2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyImageInfo2.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nsrcImage

      public static long nsrcImage(long struct)
      Unsafe version of srcImage().
    • nsrcImageLayout

      public static int nsrcImageLayout(long struct)
      Unsafe version of srcImageLayout().
    • ndstImage

      public static long ndstImage(long struct)
      Unsafe version of dstImage().
    • ndstImageLayout

      public static int ndstImageLayout(long struct)
      Unsafe version of dstImageLayout().
    • nregionCount

      public static int nregionCount(long struct)
      Unsafe version of regionCount().
    • npRegions

      public static VkImageCopy2.Buffer npRegions(long struct)
      Unsafe version of pRegions().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nsrcImage

      public static void nsrcImage(long struct, long value)
      Unsafe version of srcImage.
    • nsrcImageLayout

      public static void nsrcImageLayout(long struct, int value)
      Unsafe version of srcImageLayout.
    • ndstImage

      public static void ndstImage(long struct, long value)
      Unsafe version of dstImage.
    • ndstImageLayout

      public static void ndstImageLayout(long struct, int value)
      Unsafe version of dstImageLayout.
    • nregionCount

      public static void nregionCount(long struct, int value)
      Sets the specified value to the regionCount field of the specified struct.
    • npRegions

      public static void npRegions(long struct, VkImageCopy2.Buffer value)
      Unsafe version of pRegions.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate