Class VkMemoryToImageCopy

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

public class VkMemoryToImageCopy extends org.lwjgl.system.Struct<VkMemoryToImageCopy> implements org.lwjgl.system.NativeResource
Structure specifying a host memory to image copy operation.
Description

This structure is functionally similar to VkBufferImageCopy2, except it defines host memory as the source of copy instead of a buffer. In particular, the same data packing rules and restrictions as that structure apply here as well.

Valid Usage
  • pHostPointer must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element of pRegions
  • The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory
  • bufferRowLength must be 0, or greater than or equal to the width member of imageExtent
  • bufferImageHeight must be 0, or greater than or equal to the height member of imageExtent
  • The aspectMask member of imageSubresource must only have a single bit set
  • imageExtent.width must not be 0
  • imageExtent.height must not be 0
  • imageExtent.depth must not be 0
Valid Usage (Implicit)
See Also

VkCopyMemoryToImageInfo, VkExtent3D, VkImageSubresourceLayers, VkOffset3D

Layout


 struct VkMemoryToImageCopy {
     VkStructureType sType();
     void const * pNext();
     void const * pHostPointer();
     uint32_t memoryRowLength();
     uint32_t memoryImageHeight();
     VkImageSubresourceLayers imageSubresource();
     VkOffset3D imageOffset();
     VkExtent3D imageExtent();
 }
  • 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.
    • PHOSTPOINTER

      public static final int PHOSTPOINTER
      The struct member offsets.
    • MEMORYROWLENGTH

      public static final int MEMORYROWLENGTH
      The struct member offsets.
    • MEMORYIMAGEHEIGHT

      public static final int MEMORYIMAGEHEIGHT
      The struct member offsets.
    • IMAGESUBRESOURCE

      public static final int IMAGESUBRESOURCE
      The struct member offsets.
    • IMAGEOFFSET

      public static final int IMAGEOFFSET
      The struct member offsets.
    • IMAGEEXTENT

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

    • VkMemoryToImageCopy

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

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

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

      public long pHostPointer()
      the host memory address which is the source of the copy.
    • memoryRowLength

      public int memoryRowLength()
      memoryRowLength and memoryImageHeight specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the imageExtent.
    • memoryImageHeight

      public int memoryImageHeight()
      see memoryRowLength
    • imageSubresource

      public VkImageSubresourceLayers imageSubresource()
      a VkImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.
    • imageOffset

      public VkOffset3D imageOffset()
      selects the initial x, y, z offsets in texels of the sub-region of the destination image data.
    • imageExtent

      public VkExtent3D imageExtent()
      the size in texels of the image to copy in width, height and depth.
    • sType

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

      public VkMemoryToImageCopy sType$Default()
      Sets the STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY value to the sType() field.
    • pNext

      public VkMemoryToImageCopy pNext(long value)
      Sets the specified value to the pNext() field.
    • pHostPointer

      public VkMemoryToImageCopy pHostPointer(long value)
      Sets the specified value to the pHostPointer() field.
    • memoryRowLength

      public VkMemoryToImageCopy memoryRowLength(int value)
      Sets the specified value to the memoryRowLength() field.
    • memoryImageHeight

      public VkMemoryToImageCopy memoryImageHeight(int value)
      Sets the specified value to the memoryImageHeight() field.
    • imageSubresource

      public VkMemoryToImageCopy imageSubresource(VkImageSubresourceLayers value)
      Copies the specified VkImageSubresourceLayers to the imageSubresource() field.
    • imageSubresource

      public VkMemoryToImageCopy imageSubresource(Consumer<VkImageSubresourceLayers> consumer)
      Passes the imageSubresource() field to the specified Consumer.
    • imageOffset

      public VkMemoryToImageCopy imageOffset(VkOffset3D value)
      Copies the specified VkOffset3D to the imageOffset() field.
    • imageOffset

      public VkMemoryToImageCopy imageOffset(Consumer<VkOffset3D> consumer)
      Passes the imageOffset() field to the specified Consumer.
    • imageExtent

      public VkMemoryToImageCopy imageExtent(VkExtent3D value)
      Copies the specified VkExtent3D to the imageExtent() field.
    • imageExtent

      public VkMemoryToImageCopy imageExtent(Consumer<VkExtent3D> consumer)
      Passes the imageExtent() field to the specified Consumer.
    • set

      public VkMemoryToImageCopy set(int sType, long pNext, long pHostPointer, int memoryRowLength, int memoryImageHeight, VkImageSubresourceLayers imageSubresource, VkOffset3D imageOffset, VkExtent3D imageExtent)
      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 VkMemoryToImageCopy malloc()
      Returns a new VkMemoryToImageCopy instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long npHostPointer(long struct)
      Unsafe version of pHostPointer().
    • nmemoryRowLength

      public static int nmemoryRowLength(long struct)
      Unsafe version of memoryRowLength().
    • nmemoryImageHeight

      public static int nmemoryImageHeight(long struct)
      Unsafe version of memoryImageHeight().
    • nimageSubresource

      public static VkImageSubresourceLayers nimageSubresource(long struct)
      Unsafe version of imageSubresource().
    • nimageOffset

      public static VkOffset3D nimageOffset(long struct)
      Unsafe version of imageOffset().
    • nimageExtent

      public static VkExtent3D nimageExtent(long struct)
      Unsafe version of imageExtent().
    • 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.
    • npHostPointer

      public static void npHostPointer(long struct, long value)
      Unsafe version of pHostPointer.
    • nmemoryRowLength

      public static void nmemoryRowLength(long struct, int value)
      Unsafe version of memoryRowLength.
    • nmemoryImageHeight

      public static void nmemoryImageHeight(long struct, int value)
      Unsafe version of memoryImageHeight.
    • nimageSubresource

      public static void nimageSubresource(long struct, VkImageSubresourceLayers value)
      Unsafe version of imageSubresource.
    • nimageOffset

      public static void nimageOffset(long struct, VkOffset3D value)
      Unsafe version of imageOffset.
    • nimageExtent

      public static void nimageExtent(long struct, VkExtent3D value)
      Unsafe version of imageExtent.
    • validate

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