Class VkDeviceQueueInfo2

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

public class VkDeviceQueueInfo2 extends org.lwjgl.system.Struct<VkDeviceQueueInfo2> implements org.lwjgl.system.NativeResource
Structure specifying the parameters used for device queue creation.
Description

The queue returned by vkGetDeviceQueue2 must have the same flags value from this structure as that used at device creation time in a VkDeviceQueueCreateInfo structure.

Note

Normally, if you create both protected-capable and non-protected-capable queues with the same family, they are treated as separate lists of queues and queueIndex is relative to the start of the list of queues specified by both queueFamilyIndex and flags. However, for historical reasons, some implementations may exhibit different behavior. These divergent implementations instead concatenate the lists of queues and treat queueIndex as relative to the start of the first list of queues with the given queueFamilyIndex. This only matters in cases where an application has created both protected-capable and non-protected-capable queues from the same queue family.

For such divergent implementations, the maximum value of queueIndex is equal to the sum of VkDeviceQueueCreateInfo::queueCount minus one, for all VkDeviceQueueCreateInfo structures that share a common queueFamilyIndex.

Such implementations will return NULL for either the protected or unprotected queues when calling vkGetDeviceQueue2 with queueIndex in the range zero to VkDeviceQueueCreateInfo::queueCount minus one. In cases where these implementations returned NULL, the corresponding queues are instead located in the extended range described in the preceding two paragraphs.

This behavior will not be observed on any driver that has passed Vulkan conformance test suite version 1.3.3.0, or any subsequent version. This information can be found by querying VkPhysicalDeviceDriverProperties::conformanceVersion.

Valid Usage
  • queueFamilyIndex must be one of the queue family indices specified when device was created, via the VkDeviceQueueCreateInfo structure
  • flags must be equal to VkDeviceQueueCreateInfo::flags for a VkDeviceQueueCreateInfo structure for the queue family indicated by queueFamilyIndex when device was created
  • queueIndex must be less than VkDeviceQueueCreateInfo::queueCount for the corresponding queue family and flags indicated by queueFamilyIndex and flags when device was created
Valid Usage (Implicit)
See Also

GetDeviceQueue2

Layout


 struct VkDeviceQueueInfo2 {
     VkStructureType sType();
     void const * pNext();
     VkDeviceQueueCreateFlags flags();
     uint32_t queueFamilyIndex();
     uint32_t queueIndex();
 }
  • 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.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • QUEUEFAMILYINDEX

      public static final int QUEUEFAMILYINDEX
      The struct member offsets.
    • QUEUEINDEX

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

    • VkDeviceQueueInfo2

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

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

      public long pNext()
      NULL or a pointer to a structure extending this structure. The pNext chain of VkDeviceQueueInfo2 can be used to provide additional device queue parameters to vkGetDeviceQueue2.
    • flags

      public int flags()
      a VkDeviceQueueCreateFlags value indicating the flags used to create the device queue.
    • queueFamilyIndex

      public int queueFamilyIndex()
      the index of the queue family to which the queue belongs.
    • queueIndex

      public int queueIndex()
      the index of the queue to retrieve from within the set of queues that share both the queue family and flags specified.
    • sType

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

      public VkDeviceQueueInfo2 sType$Default()
      Sets the STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2 value to the sType() field.
    • pNext

      public VkDeviceQueueInfo2 pNext(long value)
      Sets the specified value to the pNext() field.
    • flags

      public VkDeviceQueueInfo2 flags(int value)
      Sets the specified value to the flags() field.
    • queueFamilyIndex

      public VkDeviceQueueInfo2 queueFamilyIndex(int value)
      Sets the specified value to the queueFamilyIndex() field.
    • queueIndex

      public VkDeviceQueueInfo2 queueIndex(int value)
      Sets the specified value to the queueIndex() field.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static VkDeviceQueueInfo2.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 VkDeviceQueueInfo2.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 VkDeviceQueueInfo2 malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkDeviceQueueInfo2 instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static int nflags(long struct)
      Unsafe version of flags().
    • nqueueFamilyIndex

      public static int nqueueFamilyIndex(long struct)
      Unsafe version of queueFamilyIndex().
    • nqueueIndex

      public static int nqueueIndex(long struct)
      Unsafe version of queueIndex().
    • 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.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nqueueFamilyIndex

      public static void nqueueFamilyIndex(long struct, int value)
      Unsafe version of queueFamilyIndex.
    • nqueueIndex

      public static void nqueueIndex(long struct, int value)
      Unsafe version of queueIndex.