HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Core10.Queue

  • 4 types
  • 6 values
  • Packagevulkan-3.27
  • Exports37
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceQueue.hs
valuegetDeviceQueue
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the queue.

  3. -> "queueFamilyIndex" ::: Word32

    queueFamilyIndex is the index of the queue family to which the queue belongs.

  4. -> "queueIndex" ::: Word32

    queueIndex is the index within this queue family of the queue to retrieve.

  5. -> io Queue
#

vkGetDeviceQueue - Get a queue handle from a device

Description

getDeviceQueue must only be used to get queues that were created with the flags parameter of DeviceQueueCreateInfo set to zero. To get queues that were created with a non-zero flags parameter use getDeviceQueue2.

Valid Usage

  • queueFamilyIndex must be one of the queue family indices specified when device was created, via the DeviceQueueCreateInfo structure

  • queueIndex must be less than the value of DeviceQueueCreateInfo::queueCount for the queue family indicated by queueFamilyIndex when device was created

  • DeviceQueueCreateInfo::flags must have been zero when device was created

Valid Usage (Implicit)

  • device must be a valid Device handle

  • pQueue must be a valid pointer to a Queue handle

See Also

VK_VERSION_1_0, Device, Queue

valuequeueSubmit
  1. :: MonadIO io
  2. => Queue

    queue is the queue that the command buffers will be submitted to.

  3. -> "submits" ::: Vector (SomeStruct SubmitInfo)

    pSubmits is a pointer to an array of SubmitInfo structures, each specifying a command buffer submission batch. Command buffers and semaphores specified in this array may be accessed at any point until the queue operations they define complete execution on the device.

  4. -> Fence

    fence is an optional handle to a fence to be signaled once all submitted command buffers have completed execution. If fence is not NULL_HANDLE, it defines a fence signal operation. If it is not NULL_HANDLE, fence may be accessed at any point until this command completes on the device.

  5. -> io ()
#

vkQueueSubmit - Submits a sequence of semaphores or command buffers to a queue

Description

queueSubmit is a queue submission command, with each batch defined by an element of pSubmits. Batches begin execution in the order they appear in pSubmits, but may complete out of order.

The order that batches appear in pSubmits is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these batches may overlap or otherwise execute out of order.

Fence operations submitted with queueSubmit have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the fence sections of the synchronization chapter.

The first synchronization scope of each semaphore signal operation defined by this command includes every command in the same batch that the signal operation is defined in, and all commands that occur earlier in submission order.

The second synchronization scope of each semaphore wait operation defined by this command includes every command in the same batch that the wait operation is defined in, and all commands that occur later in submission order. The scope is limited by the pWaitDstStageMask for each batch, as described in SubmitInfo.

If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT flag, it instead moves to the invalid state.

If queueSubmit fails, it may return ERROR_OUT_OF_HOST_MEMORY or ERROR_OUT_OF_DEVICE_MEMORY. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced by pSubmits is unaffected by the call or its failure. If queueSubmit fails in such a way that the implementation is unable to make that guarantee, the implementation must return ERROR_DEVICE_LOST. See Lost Device.

Valid Usage

  • If fence is not NULL_HANDLE, fence must not be associated with any other queue command that has not yet completed execution on that queue

  • Any calls to cmdSetEvent, cmdResetEvent or cmdWaitEvents that have been recorded into any of the command buffer elements of the pCommandBuffers member of any element of pSubmits, must not reference any Event that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state

  • Any stage flag included in any element of the pWaitDstStageMask member of any element of pSubmits must be a pipeline stage supported by one of the capabilities of queue, as specified in the table of supported pipeline stages

  • Each binary semaphore element of the pSignalSemaphores member of any element of pSubmits must be unsignaled when the semaphore signal operation it defines is executed on the device

  • When a semaphore wait operation referring to a binary semaphore defined by any element of the pWaitSemaphores member of any element of pSubmits executes on queue, there must be no other queues waiting on the same semaphore

  • All elements of the pWaitSemaphores member of all elements of pSubmits created with a SemaphoreType of SEMAPHORE_TYPE_BINARY must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends must have also been submitted for execution

  • Each element of the pCommandBuffers member of each element of pSubmits must be in the pending or executable state

  • If any element of the pCommandBuffers member of any element of pSubmits was not recorded with the COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state

  • Any secondary command buffers recorded into any element of the pCommandBuffers member of any element of pSubmits must be in the pending or executable state

  • If any secondary command buffers recorded into any element of the pCommandBuffers member of any element of pSubmits was not recorded with the COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT, it must not be in the pending state

  • Each element of the pCommandBuffers member of each element of pSubmits must have been allocated from a CommandPool that was created for the same queue family queue belongs to

  • If any element of pSubmits->pCommandBuffers includes a Queue Family Ownership Transfer Acquire Operation, there must exist a previously submitted Queue Family Ownership Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens-before the acquire operation

  • If any element of pSubmits->pCommandBuffers includes a Queue Family Ownership Transfer Acquire Operation, the affected resource must not be modified in any way between the last matching release operation and the acquire operation

  • If a command recorded into any element of pCommandBuffers was a cmdBeginQuery whose queryPool was created with a queryType of QUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held continuously on the Device that queue was retrieved from, throughout recording of those command buffers

  • Any resource created with SHARING_MODE_EXCLUSIVE that is read by an operation specified by pSubmits must not be owned by any queue family other than the one which queue belongs to, at the time it is executed

  • Any resource created with SHARING_MODE_CONCURRENT that is accessed by an operation specified by pSubmits must have included the queue family of queue at resource creation time

  • If queue was not created with DEVICE_QUEUE_CREATE_PROTECTED_BIT, there must be no element of pSubmits that includes a ProtectedSubmitInfo structure in its pNext chain with protectedSubmit equal to TRUE

Valid Usage (Implicit)

  • queue must be a valid Queue handle

  • If submitCount is not 0, pSubmits must be a valid pointer to an array of submitCount valid SubmitInfo structures

  • If fence is not NULL_HANDLE, fence must be a valid Fence handle

  • Both of fence, and queue that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to fence must be externally synchronized

Command Properties

'

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, Fence, Queue, SubmitInfo

valuequeueWaitIdle
  1. :: MonadIO io
  2. => Queue

    queue is the queue on which to wait.

  3. -> io ()
#

vkQueueWaitIdle - Wait for a queue to become idle

Description

queueWaitIdle is equivalent to having submitted a valid fence to every previously executed queue submission command that accepts a fence, then waiting for all of those fences to signal using waitForFences with an infinite timeout and waitAll set to TRUE.

Even though queuePresentKHR does not have a fence parameter, it does accept a fence through SwapchainPresentFenceInfoEXT.

Valid Usage (Implicit)

  • queue must be a valid Queue handle

Host Synchronization

Command Properties

'

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, Queue

valuedeviceWaitIdle
  1. :: MonadIO io
  2. => Device

    device is the logical device to idle.

  3. -> io ()
#

vkDeviceWaitIdle - Wait for a device to become idle

Description

deviceWaitIdle is equivalent to calling queueWaitIdle for all queues owned by device.

Valid Usage (Implicit)

  • device must be a valid Device handle

Host Synchronization

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, Device

datadata SubmitInfo (es :: [Type])
#

VkSubmitInfo - Structure specifying a queue submit operation

Description

The order that command buffers appear in pCommandBuffers is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these command buffers may overlap or otherwise execute out of order.

The second synchronization scope of each semaphore wait operation defined by this structure is limited to operations in stages indicated by the corresponding element of pWaitDstStageMask.

A common scenario for using pWaitDstStageMask with values other than PIPELINE_STAGE_ALL_COMMANDS_BIT is when synchronizing a window system presentation operation against subsequent command buffers which render the next frame. In this case, a presentation image must not be overwritten until the presentation operation completes, but other pipeline stages can execute without waiting. A mask of PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT prevents subsequent color attachment writes from executing until the semaphore signals. Some implementations may be able to execute transfer operations and/or pre-rasterization work before the semaphore is signaled.

If an image layout transition needs to be performed on a presentable image before it is used in a framebuffer, that can be performed as the first operation submitted to the queue after acquiring the image, and should not prevent other work from overlapping with the presentation operation. For example, a ImageMemoryBarrier could use:

Alternatively, oldLayout can be IMAGE_LAYOUT_UNDEFINED, if the image’s contents need not be preserved.

This barrier accomplishes a dependency chain between previous presentation operations and subsequent color attachment output operations, with the layout transition performed in between, and does not introduce a dependency between previous work and any pre-rasterization shader stages. More precisely, the semaphore signals after the presentation operation completes, the semaphore wait stalls the PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT stage, and there is a dependency from that same stage to itself with the layout transition performed in between.

Valid Usage

Valid Usage (Implicit)

See Also

VK_VERSION_1_0, CommandBuffer, PipelineStageFlags, Semaphore, StructureType, queueSubmit

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero
datadata Queue
#
Instances5Eq, Show, HasObjectType, IsHandle, Zero
  • Eq QueueDefined in vulkan-3.27 · Vulkan.Core10.Handles
  • Show QueueDefined in vulkan-3.27 · Vulkan.Core10.Handles
  • HasObjectType QueueDefined in vulkan-3.27 · Vulkan.Core10.Handles
  • IsHandle QueueDefined in vulkan-3.27 · Vulkan.Core10.Handles
  • Zero QueueDefined in vulkan-3.27 · Vulkan.Core10.Handles
newtypenewtype PipelineStageFlagBits
#

VkPipelineStageFlagBits - Bitmask specifying pipeline stages

Description

These values all have the same meaning as the equivalently named values for PipelineStageFlags2.

See Also

VK_VERSION_1_0, CheckpointDataNV, PipelineStageFlags, cmdWriteBufferMarkerAMD, cmdWriteTimestamp

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …