Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getDeviceQueue :: forall io. MonadIO io => Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> io Queue
- queueSubmit :: forall io. MonadIO io => Queue -> ("submits" ::: Vector (SomeStruct SubmitInfo)) -> Fence -> io ()
- queueWaitIdle :: forall io. MonadIO io => Queue -> io ()
- queueWaitIdleSafe :: forall io. MonadIO io => Queue -> io ()
- deviceWaitIdle :: forall io. MonadIO io => Device -> io ()
- deviceWaitIdleSafe :: forall io. MonadIO io => Device -> io ()
- data SubmitInfo (es :: [Type]) = SubmitInfo {}
- data Queue = Queue {}
- newtype PipelineStageFlagBits where
- PipelineStageFlagBits Flags
- pattern PIPELINE_STAGE_TOP_OF_PIPE_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_DRAW_INDIRECT_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_VERTEX_INPUT_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_VERTEX_SHADER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_GEOMETRY_SHADER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_FRAGMENT_SHADER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_COMPUTE_SHADER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_TRANSFER_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_HOST_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_ALL_GRAPHICS_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_ALL_COMMANDS_BIT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_COMMAND_PREPROCESS_BIT_NV :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_MESH_SHADER_BIT_NV :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_TASK_SHADER_BIT_NV :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT :: PipelineStageFlagBits
- pattern PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT :: PipelineStageFlagBits
- type PipelineStageFlags = PipelineStageFlagBits
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> ("queueFamilyIndex" ::: Word32) |
|
-> ("queueIndex" ::: Word32) |
|
-> 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 whendevice
was created, via theDeviceQueueCreateInfo
structure
-
queueIndex
must be less than the number of queues created for the specified queue family index whendevice
was created, via thequeueCount
member of theDeviceQueueCreateInfo
structure -
DeviceQueueCreateInfo
::flags
must have been set to zero whendevice
was created
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
pQueue
must be a valid pointer to aQueue
handle
See Also
:: forall io. MonadIO io | |
=> Queue |
|
-> ("submits" ::: Vector (SomeStruct SubmitInfo)) |
|
-> Fence |
|
-> 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.
Fence and semaphore 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
semaphore
and
fence
sections of
the synchronization chapter.
Details on the interaction of pWaitDstStageMask
with synchronization
are described in the
semaphore wait operation
section of
the synchronization chapter.
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.
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 notNULL_HANDLE
,fence
must be unsignaled
- If
fence
is notNULL_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
orcmdWaitEvents
that have been recorded into any of the command buffer elements of thepCommandBuffers
member of any element ofpSubmits
, must not reference anyEvent
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 ofpSubmits
must be a pipeline stage supported by one of the capabilities ofqueue
, as specified in the table of supported pipeline stages - Each element of the
pSignalSemaphores
member of any element ofpSubmits
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 ofpSubmits
executes onqueue
, there must be no other queues waiting on the same semaphore - All elements of the
pWaitSemaphores
member of all elements ofpSubmits
created with aSemaphoreType
ofSEMAPHORE_TYPE_BINARY
must reference a semaphore signal operation that has been submitted for execution and any semaphore signal operations on which it depends (if any) must have also been submitted for execution - Each element of the
pCommandBuffers
member of each element ofpSubmits
must be in the pending or executable state - If any element of the
pCommandBuffers
member of any element ofpSubmits
was not recorded with theCOMMAND_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 ofpSubmits
must be in the pending or executable state - If any
secondary command buffers recorded
into any element of the
pCommandBuffers
member of any element ofpSubmits
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
, it must not be in the pending state - Each element of the
pCommandBuffers
member of each element ofpSubmits
must have been allocated from aCommandPool
that was created for the same queue familyqueue
belongs to - If any element of
pSubmits->pCommandBuffers
includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family 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 a command recorded
into any element of
pCommandBuffers
was acmdBeginQuery
whosequeryPool
was created with aqueryType
ofQUERY_TYPE_PERFORMANCE_QUERY_KHR
, the profiling lock must have been held continuously on theDevice
thatqueue
was retrieved from, throughout recording of those command buffers - Any resource created with
SHARING_MODE_EXCLUSIVE
that is read by an operation specified bypSubmits
must not be owned by any queue family other than the one whichqueue
belongs to, at the time it is executed
Valid Usage (Implicit)
-
queue
must be a validQueue
handle
- If
submitCount
is not0
,pSubmits
must be a valid pointer to an array ofsubmitCount
validSubmitInfo
structures - If
fence
is notNULL_HANDLE
,fence
must be a validFence
handle - Both of
fence
, andqueue
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
queue
must be externally synchronized
- Host access to
fence
must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
- | - | Any | - |
Return Codes
See Also
vkQueueWaitIdle - Wait for a queue to become idle
Description
queueWaitIdle
is equivalent to submitting a fence to a queue and
waiting with an infinite timeout for that fence to signal.
Valid Usage (Implicit)
-
queue
must be a validQueue
handle
Host Synchronization
- Host access to
queue
must be externally synchronized
Command Properties
'
Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
---|---|---|---|
- | - | Any | - |
Return Codes
See Also
A variant of queueWaitIdle
which makes a *safe* FFI call
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 validDevice
handle
Host Synchronization
- Host access to all
Queue
objects created fromdevice
must be externally synchronized
Return Codes
See Also
A variant of deviceWaitIdle
which makes a *safe* FFI call
data SubmitInfo (es :: [Type]) Source #
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.
Valid Usage
- Each element of
pCommandBuffers
must not have been allocated withCOMMAND_BUFFER_LEVEL_SECONDARY
- If the
geometry shaders
feature is not enabled, each element of
pWaitDstStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the
tessellation shaders
feature is not enabled, each element of
pWaitDstStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- Each element of
pWaitDstStageMask
must not includePIPELINE_STAGE_HOST_BIT
- If any element of
pWaitSemaphores
orpSignalSemaphores
was created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
, then thepNext
chain must include aTimelineSemaphoreSubmitInfo
structure - If the
pNext
chain of this structure includes aTimelineSemaphoreSubmitInfo
structure and any element ofpWaitSemaphores
was created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
, then itswaitSemaphoreValueCount
member must equalwaitSemaphoreCount
- If the
pNext
chain of this structure includes aTimelineSemaphoreSubmitInfo
structure and any element ofpSignalSemaphores
was created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
, then itssignalSemaphoreValueCount
member must equalsignalSemaphoreCount
- For each element of
pSignalSemaphores
created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
the corresponding element ofTimelineSemaphoreSubmitInfo
::pSignalSemaphoreValues must have a value greater than the current value of the semaphore when the semaphore signal operation is executed - For each element of
pWaitSemaphores
created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
the corresponding element ofTimelineSemaphoreSubmitInfo
::pWaitSemaphoreValues must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on that semaphore by more than maxTimelineSemaphoreValueDifference - For each element of
pSignalSemaphores
created with aSemaphoreType
ofSEMAPHORE_TYPE_TIMELINE
the corresponding element ofTimelineSemaphoreSubmitInfo
::pSignalSemaphoreValues must have a value which does not differ from the current value of the semaphore or the value of any outstanding semaphore wait or signal operation on that semaphore by more than maxTimelineSemaphoreValueDifference - If the
mesh shaders
feature is not enabled, each element of
pWaitDstStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the
task shaders
feature is not enabled, each element of
pWaitDstStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
- If the
pNext
chain of this structure does not include aProtectedSubmitInfo
structure withprotectedSubmit
set toTRUE
, then each element of thepCommandBuffers
array must be an unprotected command buffer - If the
pNext
chain of this structure includes aProtectedSubmitInfo
structure withprotectedSubmit
set toTRUE
, then each element of thepCommandBuffers
array must be an protected command buffer
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SUBMIT_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofD3D12FenceSubmitInfoKHR
,DeviceGroupSubmitInfo
,PerformanceQuerySubmitInfoKHR
,ProtectedSubmitInfo
,TimelineSemaphoreSubmitInfo
,Win32KeyedMutexAcquireReleaseInfoKHR
, orWin32KeyedMutexAcquireReleaseInfoNV
- The
sType
value of each struct in thepNext
chain must be unique - If
waitSemaphoreCount
is not0
,pWaitSemaphores
must be a valid pointer to an array ofwaitSemaphoreCount
validSemaphore
handles - If
waitSemaphoreCount
is not0
,pWaitDstStageMask
must be a valid pointer to an array ofwaitSemaphoreCount
valid combinations ofPipelineStageFlagBits
values - Each element
of
pWaitDstStageMask
must not be0
- If
commandBufferCount
is not0
,pCommandBuffers
must be a valid pointer to an array ofcommandBufferCount
validCommandBuffer
handles - If
signalSemaphoreCount
is not0
,pSignalSemaphores
must be a valid pointer to an array ofsignalSemaphoreCount
validSemaphore
handles - Each of the elements of
pCommandBuffers
, the elements ofpSignalSemaphores
, and the elements ofpWaitSemaphores
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
CommandBuffer
,
PipelineStageFlags
,
Semaphore
,
StructureType
, queueSubmit
SubmitInfo | |
|
Instances
VkQueue - Opaque handle to a queue object
See Also
getDeviceQueue
,
getDeviceQueue2
,
getQueueCheckpointDataNV
,
queueBeginDebugUtilsLabelEXT
,
queueBindSparse
,
queueEndDebugUtilsLabelEXT
,
queueInsertDebugUtilsLabelEXT
,
queuePresentKHR
,
queueSetPerformanceConfigurationINTEL
,
queueSubmit
, queueWaitIdle
Instances
Eq Queue Source # | |
Show Queue Source # | |
Zero Queue Source # | |
Defined in Vulkan.Core10.Handles | |
HasObjectType Queue Source # | |
Defined in Vulkan.Core10.Handles objectTypeAndHandle :: Queue -> (ObjectType, Word64) Source # | |
IsHandle Queue Source # | |
Defined in Vulkan.Core10.Handles |
newtype PipelineStageFlagBits Source #
VkPipelineStageFlagBits - Bitmask specifying pipeline stages
See Also
CheckpointDataNV
,
PipelineStageFlags
,
cmdWriteBufferMarkerAMD
,
cmdWriteTimestamp