Class VkSubmitInfo

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


    public class VkSubmitInfo
    extends Struct
    Khronos Reference Page
    Vulkan Specification

    Contains information about a batch of work.

    Valid Usage
    • sType must be STRUCTURE_TYPE_SUBMIT_INFO
    • pNext must be NULL
    • If waitSemaphoreCount is not 0, pWaitSemaphores must be a pointer to an array of waitSemaphoreCount valid VkSemaphore handles
    • If waitSemaphoreCount is not 0, pWaitDstStageMask must be a pointer to an array of waitSemaphoreCount valid combinations of VkPipelineStageFlagBits values
    • Each element of pWaitDstStageMask must not be 0
    • If commandBufferCount is not 0, pCommandBuffers must be a pointer to an array of commandBufferCount valid VkCommandBuffer handles
    • If signalSemaphoreCount is not 0, pSignalSemaphores must be a pointer to an array of signalSemaphoreCount valid VkSemaphore handles
    • Each of the elements of pWaitSemaphores, the elements of pCommandBuffers and the elements of pSignalSemaphores that are valid handles must have been created, allocated or retrieved from the same VkDevice
    • Any given element of pSignalSemaphores must currently be unsignaled
    • Any given element of pCommandBuffers must either have been recorded with the COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device
    • Any given element of pCommandBuffers must be in the executable state
    • If any given element of pCommandBuffers contains commands that execute secondary command buffers, those secondary command buffers must have been recorded with the COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, or not currently be executing on the device
    • If any given element of pCommandBuffers was created with COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, it must not have been previously submitted without re-recording that command buffer
    • If any given element of pCommandBuffers contains commands that execute secondary command buffers created with COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, each such secondary command buffer must not have been previously submitted without re-recording that command buffer
    • Any given element of pCommandBuffers must not contain commands that execute a secondary command buffer, if that secondary command buffer has been recorded in another primary command buffer after it was recorded into this VkCommandBuffer
    • Any given element of pCommandBuffers must have been created on a VkCommandPool that was created for the same queue family that the calling command's queue belongs to
    • Any given element of pCommandBuffers must not have been created with COMMAND_BUFFER_LEVEL_SECONDARY
    • Any given element of VkSemaphore in pWaitSemaphores must refer to a prior signal of that VkSemaphore that won't be consumed by any other wait on that semaphore
    • If the geometry shaders feature is not enabled, any given element of pWaitDstStageMask must not contain PIPELINE_STAGE_GEOMETRY_SHADER_BIT
    • If the tessellation shaders feature is not enabled, any given element of pWaitDstStageMask must not contain PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

    Member documentation

    • sType – the type of this structure. Must be: STRUCTURE_TYPE_SUBMIT_INFO
    • pNext – reserved for use by extensions
    • waitSemaphoreCount – the number of semaphores upon which to wait before executing the command buffers for the batch
    • pWaitSemaphores – a pointer to an array of semaphores upon which to wait before executing the command buffers in the batch
    • pWaitDstStageMask – a pointer to an array of pipeline stages at which each corresponding semaphore wait will occur
    • commandBufferCount – contains the number of command buffers to execute in the batch
    • pCommandBuffers – a pointer to an array of command buffers to execute in the batch
    • signalSemaphoreCount – the number of semaphores to be signaled once the commands specified in pCommandBuffers have completed execution
    • pSignalSemaphores – a pointer to an array of semaphores which will be signaled when the command buffers for this batch have completed execution

    Layout

    struct VkSubmitInfo {
        VkStructureType sType;
        const void * pNext;
        uint32_t waitSemaphoreCount;
        const VkSemaphore * pWaitSemaphores;
        const VkPipelineStageFlags * pWaitDstStageMask;
        uint32_t commandBufferCount;
        const VkCommandBuffer * pCommandBuffers;
        uint32_t signalSemaphoreCount;
        const VkSemaphore * pSignalSemaphores;
    }
    • Field Detail

      • SIZEOF

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

      • VkSubmitInfo

        public VkSubmitInfo(java.nio.ByteBuffer container)
        Creates a VkSubmitInfo 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()
        Description copied from class: Struct
        Returns the sizeof(struct).
        Specified by:
        sizeof in class Struct
      • sType

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

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

        public int waitSemaphoreCount()
        Returns the value of the waitSemaphoreCount field.
      • pWaitSemaphores

        public java.nio.LongBuffer pWaitSemaphores()
        Returns a LongBuffer view of the data pointed to by the pWaitSemaphores field.
      • pWaitDstStageMask

        public java.nio.IntBuffer pWaitDstStageMask()
        Returns a IntBuffer view of the data pointed to by the pWaitDstStageMask field.
      • commandBufferCount

        public int commandBufferCount()
        Returns the value of the commandBufferCount field.
      • pCommandBuffers

        public PointerBuffer pCommandBuffers()
        Returns a PointerBuffer view of the data pointed to by the pCommandBuffers field.
      • signalSemaphoreCount

        public int signalSemaphoreCount()
        Returns the value of the signalSemaphoreCount field.
      • pSignalSemaphores

        public java.nio.LongBuffer pSignalSemaphores()
        Returns a LongBuffer view of the data pointed to by the pSignalSemaphores field.
      • sType

        public VkSubmitInfo sType(int value)
        Sets the specified value to the sType field.
      • pNext

        public VkSubmitInfo pNext(long value)
        Sets the specified value to the pNext field.
      • waitSemaphoreCount

        public VkSubmitInfo waitSemaphoreCount(int value)
        Sets the specified value to the waitSemaphoreCount field.
      • pWaitSemaphores

        public VkSubmitInfo pWaitSemaphores(java.nio.LongBuffer value)
        Sets the address of the specified LongBuffer to the pWaitSemaphores field.
      • pWaitDstStageMask

        public VkSubmitInfo pWaitDstStageMask(java.nio.IntBuffer value)
        Sets the address of the specified IntBuffer to the pWaitDstStageMask field.
      • pSignalSemaphores

        public VkSubmitInfo pSignalSemaphores(java.nio.LongBuffer value)
        Sets the address of the specified LongBuffer to the pSignalSemaphores field.
      • set

        public VkSubmitInfo set(int sType,
                                long pNext,
                                int waitSemaphoreCount,
                                java.nio.LongBuffer pWaitSemaphores,
                                java.nio.IntBuffer pWaitDstStageMask,
                                PointerBuffer pCommandBuffers,
                                java.nio.LongBuffer pSignalSemaphores)
        Initializes this struct with the specified values.
      • set

        public VkSubmitInfo set(VkSubmitInfo src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • create

        public static VkSubmitInfo create(long address)
        Returns a new VkSubmitInfo instance for the specified memory address or null if the address is NULL.
      • create

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

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

        public static VkSubmitInfo.Buffer callocStack(int capacity,
                                                      MemoryStack stack)
        Returns a new VkSubmitInfo.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
      • 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 VkSubmitInfo.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