Class VkCopyBufferToImageInfo2

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

public class VkCopyBufferToImageInfo2 extends org.lwjgl.system.Struct<VkCopyBufferToImageInfo2> implements org.lwjgl.system.NativeResource
Structure specifying parameters of a buffer to image copy command.
Valid Usage
  • 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 imageSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created
  • If imageSubresource.layerCount is not REMAINING_ARRAY_LAYERS, imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of pRegions 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
  • For each element of pRegions, bufferRowLength must be a multiple of the texel block extent width of the VkFormat of dstImage
  • For each element of pRegions, bufferImageHeight must be a multiple of the texel block extent height of the VkFormat of dstImage
  • For each element of pRegions, bufferRowLength divided by the texel block extent width and then multiplied by the texel block size of dstImage must be less than or equal to 231-1
  • If dstImage does not have either a depth/stencil format or a multi-planar format, then for each element of pRegions, bufferOffset must be a multiple of the texel block size
  • If dstImage has a multi-planar format, then for each element of pRegions, bufferOffset must be a multiple of the element size of the compatible format for the format and the aspectMask of the imageSubresource as defined in Compatible formats of planes of multi-planar formats
  • If dstImage has a depth/stencil format, the bufferOffset member of any element of pRegions must be a multiple of 4
  • For each element of pRegions not containing VkCopyCommandTransformInfoQCOM in its pNext chain, 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 imageSubresource of dstImage
  • For each element of pRegions not containing VkCopyCommandTransformInfoQCOM in its pNext chain, 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 imageSubresource of dstImage
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2
  • pNext must be NULL
  • srcBuffer must be a valid VkBuffer handle
  • 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 VkBufferImageCopy2 structures
  • regionCount must be greater than 0
  • Both of dstImage, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice
See Also

VkBufferImageCopy2, CmdCopyBufferToImage2, CmdCopyBufferToImage2KHR

Layout


 struct VkCopyBufferToImageInfo2 {
     VkStructureType sType();
     void const * pNext();
     VkBuffer srcBuffer();
     VkImage dstImage();
     VkImageLayout dstImageLayout();
     uint32_t regionCount();
     VkBufferImageCopy2 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.
    • SRCBUFFER

      public static final int SRCBUFFER
      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

    • VkCopyBufferToImageInfo2

      public VkCopyBufferToImageInfo2(ByteBuffer container)
      Creates a VkCopyBufferToImageInfo2 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<VkCopyBufferToImageInfo2>
    • sType

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

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

      public long srcBuffer()
      the source buffer.
    • dstImage

      public long dstImage()
      the destination image.
    • dstImageLayout

      public int dstImageLayout()
      the layout of the destination image subresources for the copy.
    • regionCount

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

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

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

      public VkCopyBufferToImageInfo2 sType$Default()
    • pNext

      public VkCopyBufferToImageInfo2 pNext(long value)
      Sets the specified value to the pNext() field.
    • srcBuffer

      public VkCopyBufferToImageInfo2 srcBuffer(long value)
      Sets the specified value to the srcBuffer() field.
    • dstImage

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

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

      Sets the address of the specified VkBufferImageCopy2.Buffer to the pRegions() field.
    • set

      public VkCopyBufferToImageInfo2 set(int sType, long pNext, long srcBuffer, long dstImage, int dstImageLayout, VkBufferImageCopy2.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 VkCopyBufferToImageInfo2 malloc()
      Returns a new VkCopyBufferToImageInfo2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

      public static VkCopyBufferToImageInfo2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkCopyBufferToImageInfo2.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().
    • nsrcBuffer

      public static long nsrcBuffer(long struct)
      Unsafe version of srcBuffer().
    • 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 VkBufferImageCopy2.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.
    • nsrcBuffer

      public static void nsrcBuffer(long struct, long value)
      Unsafe version of srcBuffer.
    • 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, VkBufferImageCopy2.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