Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- getDeviceQueue :: Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> IO Queue
- queueSubmit :: PokeChain a => Queue -> ("submits" ::: Vector (SubmitInfo a)) -> Fence -> IO ()
- queueWaitIdle :: Queue -> IO ()
- deviceWaitIdle :: Device -> IO ()
- data SubmitInfo (es :: [Type]) = SubmitInfo {}
Documentation
getDeviceQueue :: Device -> ("queueFamilyIndex" ::: Word32) -> ("queueIndex" ::: Word32) -> IO Queue Source #
vkGetDeviceQueue - Get a queue handle from a device
Parameters
Device
is the logical device that owns the queue.
queueFamilyIndex
is the index of the queue family to which the queue belongs.queueIndex
is the index within this queue family of the queue to retrieve.pQueue
is a pointer to aQueue
object that will be filled with the handle for the requested queue.
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- 'Graphics.Vulkan.Core10.Device.DeviceQueueCreateInfo'::'Graphics.Vulkan.Core10.BaseType.Flags'
must have been set to zero when
Device
was created
Valid Usage (Implicit)
pQueue
must be a valid pointer to aQueue
handle
See Also
queueSubmit :: PokeChain a => Queue -> ("submits" ::: Vector (SubmitInfo a)) -> Fence -> IO () Source #
vkQueueSubmit - Submits a sequence of semaphores or command buffers to a queue
Parameters
Queue
is the queue that the command buffers will be submitted to.
submitCount
is the number of elements in thepSubmits
array.pSubmits
is a pointer to an array ofSubmitInfo
structures, each specifying a command buffer submission batch.Fence
is an optional handle to a fence to be signaled once all submitted command buffers have completed execution. IfFence
is notNULL_HANDLE
, it defines a fence signal operation.
Description
Note
Submission can be a high overhead operation, and applications should
attempt to batch work together into as few calls to queueSubmit
as
possible.
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)
- 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
queueWaitIdle :: Queue -> IO () Source #
vkQueueWaitIdle - Wait for a queue to become idle
Parameters
Queue
is the queue on which to wait.
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)
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
deviceWaitIdle :: Device -> IO () Source #
vkDeviceWaitIdle - Wait for a device to become idle
Parameters
Device
is the logical device to idle.
Description
deviceWaitIdle
is equivalent to calling queueWaitIdle
for all queues
owned by Device
.
Valid Usage (Implicit)
Host Synchronization
Return Codes
See Also
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
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 | |
|