Class VkDecompressMemoryRegionNV

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

public class VkDecompressMemoryRegionNV extends org.lwjgl.system.Struct<VkDecompressMemoryRegionNV> implements org.lwjgl.system.NativeResource
Structure specifying decompression parameters.
Valid Usage
  • The srcAddress must be 4 byte aligned
  • The memory in range srcAddress and srcAddress + compressedSize must be valid and bound to a VkDeviceMemory object
  • The dstAddress must be 4 byte aligned
  • If decompressionMethod is MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV, then decompressedSize must be less than or equal to 65536 bytes
  • The memory in range dstAddress and dstAddress + decompressedSize must be valid and bound to a VkDeviceMemory object
  • The decompressedSize must be large enough to hold the decompressed data based on the decompressionMethod
  • The decompressionMethod must have a single bit set
  • The srcAddress to srcAddress + compressedSize region must not overlap with the dstAddress and dstAddress + decompressedSize region
Valid Usage (Implicit)
  • decompressionMethod must be a valid combination of VkMemoryDecompressionMethodFlagBitsNV values
  • decompressionMethod must not be 0
See Also

CmdDecompressMemoryNV

Layout


 struct VkDecompressMemoryRegionNV {
     VkDeviceAddress srcAddress();
     VkDeviceAddress dstAddress();
     VkDeviceSize compressedSize();
     VkDeviceSize decompressedSize();
     VkMemoryDecompressionMethodFlagsNV decompressionMethod();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int SRCADDRESS
      The struct member offsets.
    • DSTADDRESS

      public static final int DSTADDRESS
      The struct member offsets.
    • COMPRESSEDSIZE

      public static final int COMPRESSEDSIZE
      The struct member offsets.
    • DECOMPRESSEDSIZE

      public static final int DECOMPRESSEDSIZE
      The struct member offsets.
    • DECOMPRESSIONMETHOD

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

    • VkDecompressMemoryRegionNV

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

      public long srcAddress()
      the address where compressed data is stored.
    • dstAddress

      public long dstAddress()
      the destination address where decompressed data will be written.
    • compressedSize

      public long compressedSize()
      the size of compressed data in bytes.
    • decompressedSize

      public long decompressedSize()
      the size of decompressed data in bytes.
    • decompressionMethod

      public long decompressionMethod()
      a bitmask of VkMemoryDecompressionMethodFlagBitsNV with a single bit set specifying the method used to decompress data.
    • srcAddress

      public VkDecompressMemoryRegionNV srcAddress(long value)
      Sets the specified value to the srcAddress() field.
    • dstAddress

      public VkDecompressMemoryRegionNV dstAddress(long value)
      Sets the specified value to the dstAddress() field.
    • compressedSize

      public VkDecompressMemoryRegionNV compressedSize(long value)
      Sets the specified value to the compressedSize() field.
    • decompressedSize

      public VkDecompressMemoryRegionNV decompressedSize(long value)
      Sets the specified value to the decompressedSize() field.
    • decompressionMethod

      public VkDecompressMemoryRegionNV decompressionMethod(long value)
      Sets the specified value to the decompressionMethod() field.
    • set

      public VkDecompressMemoryRegionNV set(long srcAddress, long dstAddress, long compressedSize, long decompressedSize, long decompressionMethod)
      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 VkDecompressMemoryRegionNV malloc()
      Returns a new VkDecompressMemoryRegionNV instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static long nsrcAddress(long struct)
      Unsafe version of srcAddress().
    • ndstAddress

      public static long ndstAddress(long struct)
      Unsafe version of dstAddress().
    • ncompressedSize

      public static long ncompressedSize(long struct)
      Unsafe version of compressedSize().
    • ndecompressedSize

      public static long ndecompressedSize(long struct)
      Unsafe version of decompressedSize().
    • ndecompressionMethod

      public static long ndecompressionMethod(long struct)
      Unsafe version of decompressionMethod().
    • nsrcAddress

      public static void nsrcAddress(long struct, long value)
      Unsafe version of srcAddress.
    • ndstAddress

      public static void ndstAddress(long struct, long value)
      Unsafe version of dstAddress.
    • ncompressedSize

      public static void ncompressedSize(long struct, long value)
      Unsafe version of compressedSize.
    • ndecompressedSize

      public static void ndecompressedSize(long struct, long value)
      Unsafe version of decompressedSize.
    • ndecompressionMethod

      public static void ndecompressionMethod(long struct, long value)
      Unsafe version of decompressionMethod.