Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- allocateCommandBuffers :: Device -> CommandBufferAllocateInfo -> IO ("commandBuffers" ::: Vector CommandBuffer)
- withCommandBuffers :: Device -> CommandBufferAllocateInfo -> (Vector CommandBuffer -> IO r) -> IO r
- freeCommandBuffers :: Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> IO ()
- beginCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO ()
- useCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO r -> IO r
- endCommandBuffer :: CommandBuffer -> IO ()
- resetCommandBuffer :: CommandBuffer -> CommandBufferResetFlags -> IO ()
- data CommandBufferAllocateInfo = CommandBufferAllocateInfo {}
- data CommandBufferInheritanceInfo (es :: [Type]) = CommandBufferInheritanceInfo {}
- data CommandBufferBeginInfo (es :: [Type]) = CommandBufferBeginInfo {}
Documentation
allocateCommandBuffers :: Device -> CommandBufferAllocateInfo -> IO ("commandBuffers" ::: Vector CommandBuffer) Source #
vkAllocateCommandBuffers - Allocate command buffers from an existing command pool
Parameters
Device
is the logical device that owns the command pool.
pAllocateInfo
is a pointer to aCommandBufferAllocateInfo
structure describing parameters of the allocation.pCommandBuffers
is a pointer to an array ofCommandBuffer
handles in which the resulting command buffer objects are returned. The array must be at least the length specified by thecommandBufferCount
member ofpAllocateInfo
. Each allocated command buffer begins in the initial state.
Description
allocateCommandBuffers
can be used to create multiple command
buffers. If the creation of any of those command buffers fails, the
implementation must destroy all successfully created command buffer
objects from this command, set all entries of the pCommandBuffers
array to NULL
and return the error.
When command buffers are first allocated, they are in the initial state.
Valid Usage (Implicit)
pAllocateInfo
must be a valid pointer to a validCommandBufferAllocateInfo
structurepCommandBuffers
must be a valid pointer to an array ofpAllocateInfo
::commandBufferCountCommandBuffer
handles- The value referenced by
pAllocateInfo
::commandBufferCount
must be greater than0
Host Synchronization
- Host access to
pAllocateInfo
::commandPool must be externally synchronized
Return Codes
See Also
withCommandBuffers :: Device -> CommandBufferAllocateInfo -> (Vector CommandBuffer -> IO r) -> IO r Source #
A safe wrapper for allocateCommandBuffers
and freeCommandBuffers
using bracket
The allocated value must not be returned from the provided computation
freeCommandBuffers :: Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> IO () Source #
vkFreeCommandBuffers - Free command buffers
Parameters
Device
is the logical device that owns the command pool.
CommandPool
is the command pool from which the command buffers were allocated.commandBufferCount
is the length of thepCommandBuffers
array.pCommandBuffers
is a pointer to an array of handles of command buffers to free.
Description
Any primary command buffer that is in the
recording or executable state
and has any element of pCommandBuffers
recorded into it, becomes
invalid.
Valid Usage
- All elements of
pCommandBuffers
must not be in the pending state
pCommandBuffers
must be a valid pointer to an array ofcommandBufferCount
CommandBuffer
handles, each element of which must either be a valid handle orNULL
Valid Usage (Implicit)
CommandPool
must be a validCommandPool
handlecommandBufferCount
must be greater than0
CommandPool
must have been created, allocated, or retrieved fromDevice
- Each element of
pCommandBuffers
that is a valid handle must have been created, allocated, or retrieved fromCommandPool
Host Synchronization
- Host access to
CommandPool
must be externally synchronized
- Host access to each member of
pCommandBuffers
must be externally synchronized
See Also
beginCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO () Source #
vkBeginCommandBuffer - Start recording a command buffer
Parameters
CommandBuffer
is the handle of the command buffer which is to be put in the recording state.
pBeginInfo
points to aCommandBufferBeginInfo
structure defining additional information about how the command buffer begins recording.
Valid Usage
CommandBuffer
must not be in the recording or pending state
- If
CommandBuffer
was allocated from aCommandPool
which did not have theCOMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
flag set,CommandBuffer
must be in the initial state - If
CommandBuffer
is a secondary command buffer, thepInheritanceInfo
member ofpBeginInfo
must be a validCommandBufferInheritanceInfo
structure - If
CommandBuffer
is a secondary command buffer and either theocclusionQueryEnable
member of thepInheritanceInfo
member ofpBeginInfo
isFALSE
, or the precise occlusion queries feature is not enabled, thequeryFlags
member of thepInheritanceInfo
memberpBeginInfo
must not containQUERY_CONTROL_PRECISE_BIT
- If
CommandBuffer
is a primary command buffer, thenpBeginInfo->flags
must not set both theCOMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
and theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flags
Valid Usage (Implicit)
CommandBuffer
must be a validCommandBuffer
handle
pBeginInfo
must be a valid pointer to a validCommandBufferBeginInfo
structure
Host Synchronization
- Host access to
CommandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatCommandBuffer
was allocated from must be externally synchronized
Return Codes
See Also
useCommandBuffer :: PokeChain a => CommandBuffer -> CommandBufferBeginInfo a -> IO r -> IO r Source #
A safe wrapper for beginCommandBuffer
and endCommandBuffer
using
bracket_
The allocated value must not be returned from the provided computation
endCommandBuffer :: CommandBuffer -> IO () Source #
vkEndCommandBuffer - Finish recording a command buffer
Parameters
CommandBuffer
is the command buffer to complete recording.
Description
If there was an error during recording, the application will be notified
by an unsuccessful return code returned by endCommandBuffer
. If the
application wishes to further use the command buffer, the command buffer
must be reset. The command buffer must have been in the
recording state,
and is moved to the
executable state.
Valid Usage
CommandBuffer
must be in the recording state.
- If
CommandBuffer
is a primary command buffer, there must not be an active render pass instance - All queries made
active
during the recording of
CommandBuffer
must have been made inactive - Conditional rendering must not be active
- If
CommandBuffer
is a secondary command buffer, there must not be an outstandingcmdBeginDebugUtilsLabelEXT
command recorded toCommandBuffer
that has not previously been ended by a call tocmdEndDebugUtilsLabelEXT
. - If
CommandBuffer
is a secondary command buffer, there must not be an outstandingcmdDebugMarkerBeginEXT
command recorded toCommandBuffer
that has not previously been ended by a call tocmdDebugMarkerEndEXT
.
Valid Usage (Implicit)
CommandBuffer
must be a validCommandBuffer
handle
Host Synchronization
- Host access to
CommandBuffer
must be externally synchronized
- Host access to the
CommandPool
thatCommandBuffer
was allocated from must be externally synchronized
Return Codes
See Also
resetCommandBuffer :: CommandBuffer -> CommandBufferResetFlags -> IO () Source #
vkResetCommandBuffer - Reset a command buffer to the initial state
Parameters
CommandBuffer
is the command buffer to reset. The command buffer can be in any state other than pending, and is moved into the initial state.
Flags
is a bitmask ofCommandBufferResetFlagBits
controlling the reset operation.
Description
Any primary command buffer that is in the
recording or executable state
and has CommandBuffer
recorded into it,
becomes
invalid.
Valid Usage
CommandBuffer
must not be in the pending state
CommandBuffer
must have been allocated from a pool that was created with theCOMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
Valid Usage (Implicit)
CommandBuffer
must be a validCommandBuffer
handle
Flags
must be a valid combination ofCommandBufferResetFlagBits
values
Host Synchronization
- Host access to
CommandBuffer
must be externally synchronized
Return Codes
See Also
data CommandBufferAllocateInfo Source #
VkCommandBufferAllocateInfo - Structure specifying the allocation parameters for command buffer object
Valid Usage (Implicit)
See Also
CommandBufferLevel
,
CommandPool
,
StructureType
,
allocateCommandBuffers
CommandBufferAllocateInfo | |
|
Instances
data CommandBufferInheritanceInfo (es :: [Type]) Source #
VkCommandBufferInheritanceInfo - Structure specifying command buffer inheritance info
Valid Usage
- If the
inherited queries
feature is not enabled,
occlusionQueryEnable
must beFALSE
- If the
inherited queries
feature is enabled,
queryFlags
must be a valid combination ofQueryControlFlagBits
values - If the
inherited queries
feature is not enabled,
queryFlags
must be0
- If the
pipeline statistics queries
feature is enabled,
pipelineStatistics
must be a valid combination ofQueryPipelineStatisticFlagBits
values - If the
pipeline statistics queries
feature is not enabled,
pipelineStatistics
must be0
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofCommandBufferInheritanceConditionalRenderingInfoEXT
orCommandBufferInheritanceRenderPassTransformInfoQCOM
- The
sType
value of each struct in thepNext
chain must be unique - Both of
Framebuffer
, andRenderPass
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
Bool32
, CommandBufferBeginInfo
,
Framebuffer
,
QueryControlFlags
,
QueryPipelineStatisticFlags
,
RenderPass
,
StructureType
CommandBufferInheritanceInfo | |
|
Instances
data CommandBufferBeginInfo (es :: [Type]) Source #
VkCommandBufferBeginInfo - Structure specifying a command buffer begin operation
Valid Usage
- If
Flags
containsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
, theRenderPass
member ofpInheritanceInfo
must be a validRenderPass
- If
Flags
containsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
, thesubpass
member ofpInheritanceInfo
must be a valid subpass index within theRenderPass
member ofpInheritanceInfo
- If
Flags
containsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
, theFramebuffer
member ofpInheritanceInfo
must be eitherNULL_HANDLE
, or a validFramebuffer
that is compatible with theRenderPass
member ofpInheritanceInfo
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
pNext
must beNULL
or a pointer to a valid instance ofDeviceGroupCommandBufferBeginInfo
- The
sType
value of each struct in thepNext
chain must be unique Flags
must be a valid combination ofCommandBufferUsageFlagBits
values
See Also
CommandBufferInheritanceInfo
,
CommandBufferUsageFlags
,
StructureType
,
beginCommandBuffer
CommandBufferBeginInfo | |
|