Class VkBindBufferMemoryDeviceGroupInfo

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
    Direct Known Subclasses:
    VkBindBufferMemoryDeviceGroupInfoKHR

    public class VkBindBufferMemoryDeviceGroupInfo
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying device within a group to bind to.
    Description

    The VkBindBufferMemoryDeviceGroupInfo structure is defined as:

    • sType is the type of this structure.
    • pNext is NULL or a pointer to an extension-specific structure.
    • deviceIndexCount is the number of elements in pDeviceIndices.
    • pDeviceIndices is a pointer to an array of device indices.

    If deviceIndexCount is greater than zero, then on device index i the buffer is attached to the instance of memory on the physical device with device index pDeviceIndices[i].

    If deviceIndexCount is zero and memory comes from a memory heap with the MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if pDeviceIndices contains consecutive indices from zero to the number of physical devices in the logical device, minus one. In other words, by default each physical device attaches to its own instance of memory.

    If deviceIndexCount is zero and memory comes from a memory heap without the MEMORY_HEAP_MULTI_INSTANCE_BIT bit set, then it is as if pDeviceIndices contains an array of zeros. In other words, by default each physical device attaches to instance zero.

    Valid Usage
    • deviceIndexCount must either be zero or equal to the number of physical devices in the logical device
    • All elements of pDeviceIndices must be valid device indices
    Valid Usage (Implicit)

    Layout

    
     struct VkBindBufferMemoryDeviceGroupInfo {
         VkStructureType sType;
         void const * pNext;
         uint32_t deviceIndexCount;
         uint32_t const * pDeviceIndices;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, DEVICEINDEXCOUNT, PDEVICEINDICES

        The struct member offsets.
    • Constructor Detail

      • VkBindBufferMemoryDeviceGroupInfo

        public VkBindBufferMemoryDeviceGroupInfo​(java.nio.ByteBuffer container)
        Creates a VkBindBufferMemoryDeviceGroupInfo 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 Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • sType

        public int sType()
        Returns the value of the sType field.
      • pNext

        public long pNext()
        Returns the value of the pNext field.
      • deviceIndexCount

        public int deviceIndexCount()
        Returns the value of the deviceIndexCount field.
      • pDeviceIndices

        @Nullable
        public java.nio.IntBuffer pDeviceIndices()
        Returns a IntBuffer view of the data pointed to by the pDeviceIndices field.
      • pDeviceIndices

        public VkBindBufferMemoryDeviceGroupInfo pDeviceIndices​(@Nullable
                                                                java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the pDeviceIndices field.
      • set

        public VkBindBufferMemoryDeviceGroupInfo set​(int sType,
                                                     long pNext,
                                                     @Nullable
                                                     java.nio.IntBuffer pDeviceIndices)
        Initializes this struct with the specified values.
      • malloc

        public static VkBindBufferMemoryDeviceGroupInfo malloc()
        Returns a new VkBindBufferMemoryDeviceGroupInfo instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

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

        public static VkBindBufferMemoryDeviceGroupInfo create​(long address)
        Returns a new VkBindBufferMemoryDeviceGroupInfo instance for the specified memory address.
      • mallocStack

        public static VkBindBufferMemoryDeviceGroupInfo mallocStack()
        Returns a new VkBindBufferMemoryDeviceGroupInfo instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VkBindBufferMemoryDeviceGroupInfo callocStack()
        Returns a new VkBindBufferMemoryDeviceGroupInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VkBindBufferMemoryDeviceGroupInfo mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkBindBufferMemoryDeviceGroupInfo instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static VkBindBufferMemoryDeviceGroupInfo callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new VkBindBufferMemoryDeviceGroupInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        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().
      • ndeviceIndexCount

        public static int ndeviceIndexCount​(long struct)
        Unsafe version of deviceIndexCount().
      • npDeviceIndices

        @Nullable
        public static java.nio.IntBuffer npDeviceIndices​(long struct)
        Unsafe version of pDeviceIndices.
      • 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.
      • ndeviceIndexCount

        public static void ndeviceIndexCount​(long struct,
                                             int value)
        Sets the specified value to the deviceIndexCount field of the specified struct.
      • npDeviceIndices

        public static void npDeviceIndices​(long struct,
                                           @Nullable
                                           java.nio.IntBuffer value)
        Unsafe version of pDeviceIndices.
      • validate

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

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array