Class VkImageBlit

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkImageBlit
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying an image blit operation.
    Description

    For each element of the pRegions array, a blit operation is performed the specified source and destination regions.

    Valid Usage
    • The aspectMask member of srcSubresource and dstSubresource must match
    • The layerCount member of srcSubresource and dstSubresource must match
    • If either of the calling command’s srcImage or dstImage parameters are of VkImageType IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of both srcSubresource and dstSubresource must be 0 and 1, respectively
    • The aspectMask member of srcSubresource must specify aspects present in the calling command’s srcImage
    • The aspectMask member of dstSubresource must specify aspects present in the calling command’s dstImage
    • srcOffset[0].x and srcOffset[1].x must both be greater than or equal to 0 and less than or equal to the source image subresource width
    • srcOffset[0].y and srcOffset[1].y must both be greater than or equal to 0 and less than or equal to the source image subresource height
    • If the calling command’s srcImage is of type IMAGE_TYPE_1D, then srcOffset[0].y must be 0 and srcOffset[1].y must be 1.
    • srcOffset[0].z and srcOffset[1].z must both be greater than or equal to 0 and less than or equal to the source image subresource depth
    • If the calling command’s srcImage is of type IMAGE_TYPE_1D or IMAGE_TYPE_2D, then srcOffset[0].z must be 0 and srcOffset[1].z must be 1.
    • dstOffset[0].x and dstOffset[1].x must both be greater than or equal to 0 and less than or equal to the destination image subresource width
    • dstOffset[0].y and dstOffset[1].y must both be greater than or equal to 0 and less than or equal to the destination image subresource height
    • If the calling command’s dstImage is of type IMAGE_TYPE_1D, then dstOffset[0].y must be 0 and dstOffset[1].y must be 1.
    • dstOffset[0].z and dstOffset[1].z must both be greater than or equal to 0 and less than or equal to the destination image subresource depth
    • If the calling command’s dstImage is of type IMAGE_TYPE_1D or IMAGE_TYPE_2D, then dstOffset[0].z must be 0 and dstOffset[1].z must be 1.
    Valid Usage (Implicit)
    See Also

    VkImageSubresourceLayers, VkOffset3D, CmdBlitImage

    Member documentation

    • srcSubresource – the subresource to blit from.
    • srcOffsets[2] – an array of two VkOffset3D structures specifying the bounds of the source region within srcSubresource.
    • dstSubresource – the subresource to blit into.
    • dstOffsets[2] – an array of two VkOffset3D structures specifying the bounds of the destination region within dstSubresource.

    Layout

    
     struct VkImageBlit {
         VkImageSubresourceLayers srcSubresource;
         VkOffset3D srcOffsets[2];
         VkImageSubresourceLayers dstSubresource;
         VkOffset3D dstOffsets[2];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SRCSUBRESOURCE, SRCOFFSETS, DSTSUBRESOURCE, DSTOFFSETS

        The struct member offsets.
    • Constructor Detail

      • VkImageBlit

        public VkImageBlit​(java.nio.ByteBuffer container)
        Creates a VkImageBlit 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
      • srcOffsets

        public VkOffset3D srcOffsets​(int index)
        Returns a VkOffset3D view of the struct at the specified index of the srcOffsets field.
      • dstOffsets

        public VkOffset3D dstOffsets​(int index)
        Returns a VkOffset3D view of the struct at the specified index of the dstOffsets field.
      • srcSubresource

        public VkImageBlit srcSubresource​(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
        Passes the srcSubresource field to the specified Consumer.
      • srcOffsets

        public VkImageBlit srcOffsets​(int index,
                                      VkOffset3D value)
        Copies the specified VkOffset3D at the specified index of the srcOffsets field.
      • srcOffsets

        public VkImageBlit srcOffsets​(java.util.function.Consumer<VkOffset3D.Buffer> consumer)
        Passes the srcOffsets field to the specified Consumer.
      • srcOffsets

        public VkImageBlit srcOffsets​(int index,
                                      java.util.function.Consumer<VkOffset3D> consumer)
        Passes the element at index of the srcOffsets field to the specified Consumer.
      • dstSubresource

        public VkImageBlit dstSubresource​(java.util.function.Consumer<VkImageSubresourceLayers> consumer)
        Passes the dstSubresource field to the specified Consumer.
      • dstOffsets

        public VkImageBlit dstOffsets​(int index,
                                      VkOffset3D value)
        Copies the specified VkOffset3D at the specified index of the dstOffsets field.
      • dstOffsets

        public VkImageBlit dstOffsets​(java.util.function.Consumer<VkOffset3D.Buffer> consumer)
        Passes the dstOffsets field to the specified Consumer.
      • dstOffsets

        public VkImageBlit dstOffsets​(int index,
                                      java.util.function.Consumer<VkOffset3D> consumer)
        Passes the element at index of the dstOffsets field to the specified Consumer.
      • set

        public VkImageBlit set​(VkImageBlit src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

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

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

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

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

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

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

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

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

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

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

        public static VkImageBlit mallocStack()
        Returns a new VkImageBlit instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkImageBlit callocStack()
        Returns a new VkImageBlit instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

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

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

        public static VkImageBlit.Buffer mallocStack​(int capacity)
        Returns a new VkImageBlit.Buffer instance allocated on the thread-local MemoryStack.
        Parameters:
        capacity - the buffer capacity
      • callocStack

        public static VkImageBlit.Buffer callocStack​(int capacity)
        Returns a new VkImageBlit.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

        public static VkImageBlit.Buffer callocStack​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new VkImageBlit.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
      • nsrcOffsets

        public static VkOffset3D nsrcOffsets​(long struct,
                                             int index)
        Unsafe version of srcOffsets.
      • ndstOffsets

        public static VkOffset3D ndstOffsets​(long struct,
                                             int index)
        Unsafe version of dstOffsets.
      • nsrcOffsets

        public static void nsrcOffsets​(long struct,
                                       int index,
                                       VkOffset3D value)
        Unsafe version of srcOffsets.
      • ndstOffsets

        public static void ndstOffsets​(long struct,
                                       int index,
                                       VkOffset3D value)
        Unsafe version of dstOffsets.