Class VkMemoryRequirements

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkMemoryRequirements>
org.lwjgl.vulkan.VkMemoryRequirements
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkMemoryRequirements extends org.lwjgl.system.Struct<VkMemoryRequirements> implements org.lwjgl.system.NativeResource
Structure specifying memory requirements.
See Also

VkMemoryRequirements2, VkVideoSessionMemoryRequirementsKHR, GetBufferMemoryRequirements, GetImageMemoryRequirements

Layout


 struct VkMemoryRequirements {
     VkDeviceSize size();
     VkDeviceSize alignment();
     uint32_t memoryTypeBits();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int SIZE
      The struct member offsets.
    • ALIGNMENT

      public static final int ALIGNMENT
      The struct member offsets.
    • MEMORYTYPEBITS

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

    • VkMemoryRequirements

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

      public long size()
      the size, in bytes, of the memory allocation required for the resource.
    • alignment

      public long alignment()
      the alignment, in bytes, of the offset within the allocation required for the resource.
    • memoryTypeBits

      public int memoryTypeBits()
      a bitmask and contains one bit set for every supported memory type for the resource. Bit i is set if and only if the memory type i in the VkPhysicalDeviceMemoryProperties structure for the physical device is supported for the resource.
    • size

      public VkMemoryRequirements size(long value)
      Sets the specified value to the size() field.
    • alignment

      public VkMemoryRequirements alignment(long value)
      Sets the specified value to the alignment() field.
    • memoryTypeBits

      public VkMemoryRequirements memoryTypeBits(int value)
      Sets the specified value to the memoryTypeBits() field.
    • set

      public VkMemoryRequirements set(long size, long alignment, int memoryTypeBits)
      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 VkMemoryRequirements malloc()
      Returns a new VkMemoryRequirements instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

      @Deprecated public static VkMemoryRequirements mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryRequirements callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryRequirements mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryRequirements callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryRequirements.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryRequirements.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static VkMemoryRequirements.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static VkMemoryRequirements.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

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

      public static long nsize(long struct)
      Unsafe version of size().
    • nalignment

      public static long nalignment(long struct)
      Unsafe version of alignment().
    • nmemoryTypeBits

      public static int nmemoryTypeBits(long struct)
      Unsafe version of memoryTypeBits().
    • nsize

      public static void nsize(long struct, long value)
      Unsafe version of size.
    • nalignment

      public static void nalignment(long struct, long value)
      Unsafe version of alignment.
    • nmemoryTypeBits

      public static void nmemoryTypeBits(long struct, int value)
      Unsafe version of memoryTypeBits.