Class VkPipelineBinaryKeyKHR

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

public class VkPipelineBinaryKeyKHR extends org.lwjgl.system.Struct<VkPipelineBinaryKeyKHR> implements org.lwjgl.system.NativeResource
Structure specifying a key to a pipeline binary.
Description

Any returned values beyond the first keySize bytes are undefined. Implementations must return a keySize greater than 0, and less-or-equal to MAX_PIPELINE_BINARY_KEY_SIZE_KHR.

Two keys are considered equal if keySize is equal and the first keySize bytes of key compare equal.

Implementations may return a different keySize for different binaries.

Implementations should ensure that keySize is large enough to uniquely identify a pipeline binary.

Valid Usage (Implicit)
See Also

VkPipelineBinaryKeysAndDataKHR, GetPipelineBinaryDataKHR, GetPipelineKeyKHR

Layout


 struct VkPipelineBinaryKeyKHR {
     VkStructureType sType();
     void * pNext();
     uint32_t keySize();
     uint8_t key()[VK_MAX_PIPELINE_BINARY_KEY_SIZE_KHR];
 }
  • 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.
    • KEYSIZE

      public static final int KEYSIZE
      The struct member offsets.
    • KEY

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

    • VkPipelineBinaryKeyKHR

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

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

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

      public int keySize()
      the size, in bytes, of valid data returned in key.
    • key

      public ByteBuffer key()
      a buffer of opaque data specifying a pipeline binary key.
    • key

      public byte key(int index)
      a buffer of opaque data specifying a pipeline binary key.
    • sType

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

      public VkPipelineBinaryKeyKHR sType$Default()
      Sets the STRUCTURE_TYPE_PIPELINE_BINARY_KEY_KHR value to the sType() field.
    • pNext

      public VkPipelineBinaryKeyKHR pNext(long value)
      Sets the specified value to the pNext() field.
    • keySize

      public VkPipelineBinaryKeyKHR keySize(int value)
      Sets the specified value to the keySize() field.
    • key

      public VkPipelineBinaryKeyKHR key(ByteBuffer value)
      Copies the specified ByteBuffer to the key() field.
    • key

      public VkPipelineBinaryKeyKHR key(int index, byte value)
      Sets the specified value at the specified index of the key() field.
    • set

      public VkPipelineBinaryKeyKHR set(int sType, long pNext, int keySize, ByteBuffer key)
      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 VkPipelineBinaryKeyKHR malloc()
      Returns a new VkPipelineBinaryKeyKHR instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static int nkeySize(long struct)
      Unsafe version of keySize().
    • nkey

      public static ByteBuffer nkey(long struct)
      Unsafe version of key().
    • nkey

      public static byte nkey(long struct, int index)
      Unsafe version of key.
    • 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.
    • nkeySize

      public static void nkeySize(long struct, int value)
      Unsafe version of keySize.
    • nkey

      public static void nkey(long struct, ByteBuffer value)
      Unsafe version of key.
    • nkey

      public static void nkey(long struct, int index, byte value)
      Unsafe version of key.