Class VkCopyBufferInfo2

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
    Direct Known Subclasses:
    VkCopyBufferInfo2KHR

    public class VkCopyBufferInfo2
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying parameters of a buffer copy command.
    Description

    Members defined by this structure with the same name as parameters in CmdCopyBuffer have the identical effect to those parameters; the child structure VkBufferCopy2 is a variant of VkBufferCopy which includes sType and pNext parameters, allowing it to be extended.

    Valid Usage
    • The srcOffset member of each element of pRegions must be less than the size of srcBuffer
    • The dstOffset member of each element of pRegions must be less than the size of dstBuffer
    • The size member of each element of pRegions must be less than or equal to the size of srcBuffer minus srcOffset
    • The size member of each element of pRegions must be less than or equal to the size of dstBuffer minus dstOffset
    • The union of the source regions, and the union of the destination regions, specified by the elements of pRegions, must not overlap in memory
    • srcBuffer must have been created with BUFFER_USAGE_TRANSFER_SRC_BIT usage flag
    • If srcBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object
    • dstBuffer must have been created with BUFFER_USAGE_TRANSFER_DST_BIT usage flag
    • If dstBuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_COPY_BUFFER_INFO_2
    • pNext must be NULL
    • srcBuffer must be a valid VkBuffer handle
    • dstBuffer must be a valid VkBuffer handle
    • pRegions must be a valid pointer to an array of regionCount valid VkBufferCopy2 structures
    • regionCount must be greater than 0
    • Both of dstBuffer, and srcBuffer must have been created, allocated, or retrieved from the same VkDevice
    See Also

    VkBufferCopy2, CmdCopyBuffer2, CmdCopyBuffer2KHR

    Layout

    
     struct VkCopyBufferInfo2 {
         VkStructureType sType();
         void const * pNext();
         VkBuffer srcBuffer();
         VkBuffer dstBuffer();
         uint32_t regionCount();
         VkBufferCopy2 const * pRegions();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SRCBUFFER, DSTBUFFER, REGIONCOUNT, PREGIONS

        The struct member offsets.
    • Constructor Detail

      • VkCopyBufferInfo2

        public VkCopyBufferInfo2​(java.nio.ByteBuffer container)
        Creates a VkCopyBufferInfo2 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 Detail

      • sizeof

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

        public int sType()
        the type of this structure.
      • pNext

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

        public long srcBuffer()
        the source buffer.
      • dstBuffer

        public long dstBuffer()
        the destination buffer.
      • regionCount

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

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

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

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

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

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

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

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

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

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

        public static VkCopyBufferInfo2.Buffer calloc​(int capacity,
                                                      org.lwjgl.system.MemoryStack stack)
        Returns a new VkCopyBufferInfo2.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • 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().
      • ndstBuffer

        public static long ndstBuffer​(long struct)
        Unsafe version of dstBuffer().
      • nregionCount

        public static int nregionCount​(long struct)
        Unsafe version of regionCount().
      • 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.
      • ndstBuffer

        public static void ndstBuffer​(long struct,
                                      long value)
        Unsafe version of dstBuffer.
      • nregionCount

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

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