Class VkAcquireNextImageInfoKHR

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkAcquireNextImageInfoKHR
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying parameters of the acquire.
    Description

    If AcquireNextImageKHR is used, the device mask is considered to include all physical devices in the logical device.

    Note

    AcquireNextImage2KHR signals at most one semaphore, even if the application requests waiting for multiple physical devices to be ready via the deviceMask. However, only a single physical device can wait on that semaphore, since the semaphore becomes unsignaled when the wait succeeds. For other physical devices to wait for the image to be ready, it is necessary for the application to submit semaphore signal operation(s) to that first physical device to signal additional semaphore(s) after the wait succeeds, which the other physical device(s) can wait upon.

    Valid Usage
    • swapchain must not be in the retired state
    • If semaphore is not NULL_HANDLE it must be unsignaled
    • If semaphore is not NULL_HANDLE it must not have any uncompleted signal or wait operations pending
    • If fence is not NULL_HANDLE it must be unsignaled and must not be associated with any other queue command that has not yet completed execution on that queue
    • semaphore and fence must not both be equal to NULL_HANDLE
    • deviceMask must be a valid device mask
    • deviceMask must not be zero
    Valid Usage (Implicit)
    • sType must be STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR
    • pNext must be NULL
    • swapchain must be a valid VkSwapchainKHR handle
    • If semaphore is not NULL_HANDLE, semaphore must be a valid VkSemaphore handle
    • If fence is not NULL_HANDLE, fence must be a valid VkFence handle
    • Each of fence, semaphore, and swapchain that are valid handles must have been created, allocated, or retrieved from the same VkInstance
    Host Synchronization
    • Host access to swapchain must be externally synchronized
    • Host access to semaphore must be externally synchronized
    • Host access to fence must be externally synchronized
    See Also

    AcquireNextImage2KHR

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • swapchain – a non-retired swapchain from which an image is acquired.
    • timeout – specifies how long the function waits, in nanoseconds, if no image is available.
    • semaphoreNULL_HANDLE or a semaphore to signal.
    • fenceNULL_HANDLE or a fence to signal.
    • deviceMask – a mask of physical devices for which the swapchain image will be ready to use when the semaphore or fence is signaled.

    Layout

    
     struct VkAcquireNextImageInfoKHR {
         VkStructureType sType;
         void const * pNext;
         VkSwapchainKHR swapchain;
         uint64_t timeout;
         VkSemaphore semaphore;
         VkFence fence;
         uint32_t deviceMask;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, SWAPCHAIN, TIMEOUT, SEMAPHORE, FENCE, DEVICEMASK

        The struct member offsets.
    • Constructor Detail

      • VkAcquireNextImageInfoKHR

        public VkAcquireNextImageInfoKHR​(java.nio.ByteBuffer container)
        Creates a VkAcquireNextImageInfoKHR 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.
      • swapchain

        public long swapchain()
        Returns the value of the swapchain field.
      • timeout

        public long timeout()
        Returns the value of the timeout field.
      • semaphore

        public long semaphore()
        Returns the value of the semaphore field.
      • fence

        public long fence()
        Returns the value of the fence field.
      • deviceMask

        public int deviceMask()
        Returns the value of the deviceMask field.
      • set

        public VkAcquireNextImageInfoKHR set​(int sType,
                                             long pNext,
                                             long swapchain,
                                             long timeout,
                                             long semaphore,
                                             long fence,
                                             int deviceMask)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

        public static VkAcquireNextImageInfoKHR.Buffer callocStack​(int capacity,
                                                                   org.lwjgl.system.MemoryStack stack)
        Returns a new VkAcquireNextImageInfoKHR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nsType

        public static int nsType​(long struct)
        Unsafe version of sType().
      • npNext

        public static long npNext​(long struct)
        Unsafe version of pNext().
      • nswapchain

        public static long nswapchain​(long struct)
        Unsafe version of swapchain().
      • ntimeout

        public static long ntimeout​(long struct)
        Unsafe version of timeout().
      • nsemaphore

        public static long nsemaphore​(long struct)
        Unsafe version of semaphore().
      • nfence

        public static long nfence​(long struct)
        Unsafe version of fence().
      • ndeviceMask

        public static int ndeviceMask​(long struct)
        Unsafe version of deviceMask().
      • 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.
      • nswapchain

        public static void nswapchain​(long struct,
                                      long value)
        Unsafe version of swapchain.
      • ntimeout

        public static void ntimeout​(long struct,
                                    long value)
        Unsafe version of timeout.
      • nsemaphore

        public static void nsemaphore​(long struct,
                                      long value)
        Unsafe version of semaphore.
      • nfence

        public static void nfence​(long struct,
                                  long value)
        Unsafe version of fence.
      • ndeviceMask

        public static void ndeviceMask​(long struct,
                                       int value)
        Unsafe version of deviceMask.