Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- allocateCommandBuffers :: forall io. MonadIO io => Device -> CommandBufferAllocateInfo -> io ("commandBuffers" ::: Vector CommandBuffer)
- withCommandBuffers :: forall io r. MonadIO io => Device -> CommandBufferAllocateInfo -> (io (Vector CommandBuffer) -> (Vector CommandBuffer -> io ()) -> r) -> r
- freeCommandBuffers :: forall io. MonadIO io => Device -> CommandPool -> ("commandBuffers" ::: Vector CommandBuffer) -> io ()
- beginCommandBuffer :: forall a io. (Extendss CommandBufferBeginInfo a, PokeChain a, MonadIO io) => CommandBuffer -> CommandBufferBeginInfo a -> io ()
- useCommandBuffer :: forall a io r. (Extendss CommandBufferBeginInfo a, PokeChain a, MonadIO io) => CommandBuffer -> CommandBufferBeginInfo a -> io r -> io r
- endCommandBuffer :: forall io. MonadIO io => CommandBuffer -> io ()
- resetCommandBuffer :: forall io. MonadIO io => CommandBuffer -> CommandBufferResetFlags -> io ()
- data CommandBufferAllocateInfo = CommandBufferAllocateInfo {}
- data CommandBufferInheritanceInfo (es :: [Type]) = CommandBufferInheritanceInfo {}
- data CommandBufferBeginInfo (es :: [Type]) = CommandBufferBeginInfo {}
- data CommandBuffer = CommandBuffer {}
- newtype CommandBufferLevel where
- newtype QueryControlFlagBits where
- type QueryControlFlags = QueryControlFlagBits
- newtype CommandBufferUsageFlagBits where
- type CommandBufferUsageFlags = CommandBufferUsageFlagBits
- newtype CommandBufferResetFlagBits where
- type CommandBufferResetFlags = CommandBufferResetFlagBits
Documentation
allocateCommandBuffers Source #
:: forall io. MonadIO io | |
=> Device |
|
-> CommandBufferAllocateInfo |
|
-> io ("commandBuffers" ::: Vector CommandBuffer) |
vkAllocateCommandBuffers - Allocate command buffers from an existing command pool
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)
device
must be a validDevice
handle
pAllocateInfo
must be a valid pointer to a validCommandBufferAllocateInfo
structurepCommandBuffers
must be a valid pointer to an array ofpAllocateInfo->commandBufferCount
CommandBuffer
handlespAllocateInfo->commandBufferCount
must be greater than0
Host Synchronization
- Host access to
pAllocateInfo->commandPool
must be externally synchronized
Return Codes
See Also
withCommandBuffers :: forall io r. MonadIO io => Device -> CommandBufferAllocateInfo -> (io (Vector CommandBuffer) -> (Vector CommandBuffer -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
allocateCommandBuffers
and freeCommandBuffers
To ensure that freeCommandBuffers
is always called: pass
bracket
(or the allocate function from your
favourite resource management library) as the first argument.
To just extract the pair pass (,)
as the first argument.
:: forall io. MonadIO io | |
=> Device |
|
-> CommandPool |
|
-> ("commandBuffers" ::: Vector CommandBuffer) |
|
-> io () |
vkFreeCommandBuffers - Free command buffers
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)
device
must be a validDevice
handle
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
:: forall a io. (Extendss CommandBufferBeginInfo a, PokeChain a, MonadIO io) | |
=> CommandBuffer |
|
-> CommandBufferBeginInfo a |
|
-> io () |
vkBeginCommandBuffer - Start recording a command buffer
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 :: forall a io r. (Extendss CommandBufferBeginInfo a, PokeChain a, MonadIO io) => CommandBuffer -> CommandBufferBeginInfo a -> io r -> io r Source #
This function will call the supplied action between calls to
beginCommandBuffer
and endCommandBuffer
Note that endCommandBuffer
is *not* called if an exception is thrown
by the inner action.
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> io () |
vkEndCommandBuffer - Finish recording a command buffer
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
:: forall io. MonadIO io | |
=> CommandBuffer |
|
-> CommandBufferResetFlags |
|
-> io () |
vkResetCommandBuffer - Reset a command buffer to the initial state
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 | |
|
Instances
data CommandBuffer Source #
VkCommandBuffer - Opaque handle to a command buffer object
See Also
SubmitInfo
,
allocateCommandBuffers
,
beginCommandBuffer
,
cmdBeginConditionalRenderingEXT
,
cmdBeginDebugUtilsLabelEXT
,
cmdBeginQuery
,
cmdBeginQueryIndexedEXT
,
cmdBeginRenderPass
,
cmdBeginRenderPass2
,
cmdBeginRenderPass2KHR
,
cmdBeginTransformFeedbackEXT
,
cmdBindDescriptorSets
,
cmdBindIndexBuffer
,
cmdBindPipeline
,
cmdBindPipelineShaderGroupNV
,
cmdBindShadingRateImageNV
,
cmdBindTransformFeedbackBuffersEXT
,
cmdBindVertexBuffers
,
cmdBindVertexBuffers2EXT
,
cmdBlitImage
,
cmdBlitImage2KHR
,
cmdBuildAccelerationStructureIndirectKHR
,
cmdBuildAccelerationStructureKHR
,
cmdBuildAccelerationStructureNV
,
cmdClearAttachments
,
cmdClearColorImage
,
cmdClearDepthStencilImage
,
cmdCopyAccelerationStructureKHR
,
cmdCopyAccelerationStructureNV
,
cmdCopyAccelerationStructureToMemoryKHR
,
cmdCopyBuffer
,
cmdCopyBuffer2KHR
,
cmdCopyBufferToImage
,
cmdCopyBufferToImage2KHR
,
cmdCopyImage
,
cmdCopyImage2KHR
,
cmdCopyImageToBuffer
,
cmdCopyImageToBuffer2KHR
,
cmdCopyMemoryToAccelerationStructureKHR
,
cmdCopyQueryPoolResults
,
cmdDebugMarkerBeginEXT
,
cmdDebugMarkerEndEXT
,
cmdDebugMarkerInsertEXT
,
cmdDispatch
,
cmdDispatchBase
,
cmdDispatchBaseKHR
,
cmdDispatchIndirect
,
cmdDraw
,
cmdDrawIndexed
,
cmdDrawIndexedIndirect
,
cmdDrawIndexedIndirectCount
,
cmdDrawIndexedIndirectCountAMD
,
cmdDrawIndexedIndirectCountKHR
,
cmdDrawIndirect
,
cmdDrawIndirectByteCountEXT
,
cmdDrawIndirectCount
,
cmdDrawIndirectCountAMD
,
cmdDrawIndirectCountKHR
,
cmdDrawMeshTasksIndirectCountNV
,
cmdDrawMeshTasksIndirectNV
,
cmdDrawMeshTasksNV
,
cmdEndConditionalRenderingEXT
,
cmdEndDebugUtilsLabelEXT
,
cmdEndQuery
,
cmdEndQueryIndexedEXT
,
cmdEndRenderPass
,
cmdEndRenderPass2
,
cmdEndRenderPass2KHR
,
cmdEndTransformFeedbackEXT
,
cmdExecuteCommands
,
cmdExecuteGeneratedCommandsNV
,
cmdFillBuffer
,
cmdInsertDebugUtilsLabelEXT
,
cmdNextSubpass
,
cmdNextSubpass2
,
cmdNextSubpass2KHR
,
cmdPipelineBarrier
,
cmdPreprocessGeneratedCommandsNV
,
cmdPushConstants
,
cmdPushDescriptorSetKHR
,
cmdPushDescriptorSetWithTemplateKHR
,
cmdResetEvent
,
cmdResetQueryPool
,
cmdResolveImage
,
cmdResolveImage2KHR
,
cmdSetBlendConstants
,
cmdSetCheckpointNV
,
cmdSetCoarseSampleOrderNV
,
cmdSetCullModeEXT
,
cmdSetDepthBias
,
cmdSetDepthBounds
,
cmdSetDepthBoundsTestEnableEXT
,
cmdSetDepthCompareOpEXT
,
cmdSetDepthTestEnableEXT
,
cmdSetDepthWriteEnableEXT
,
cmdSetDeviceMask
,
cmdSetDeviceMaskKHR
,
cmdSetDiscardRectangleEXT
,
cmdSetEvent
,
cmdSetExclusiveScissorNV
,
cmdSetFrontFaceEXT
,
cmdSetLineStippleEXT
,
cmdSetLineWidth
,
cmdSetPerformanceMarkerINTEL
,
cmdSetPerformanceOverrideINTEL
,
cmdSetPerformanceStreamMarkerINTEL
,
cmdSetPrimitiveTopologyEXT
,
cmdSetSampleLocationsEXT
,
cmdSetScissor
,
cmdSetScissorWithCountEXT
,
cmdSetStencilCompareMask
,
cmdSetStencilOpEXT
,
cmdSetStencilReference
,
cmdSetStencilTestEnableEXT
,
cmdSetStencilWriteMask
,
cmdSetViewport
,
cmdSetViewportShadingRatePaletteNV
,
cmdSetViewportWScalingNV
,
cmdSetViewportWithCountEXT
,
cmdTraceRaysIndirectKHR
,
cmdTraceRaysKHR
,
cmdTraceRaysNV
,
cmdUpdateBuffer
,
cmdWaitEvents
,
cmdWriteAccelerationStructuresPropertiesKHR
,
cmdWriteAccelerationStructuresPropertiesNV
,
cmdWriteBufferMarkerAMD
,
cmdWriteTimestamp
,
endCommandBuffer
,
freeCommandBuffers
,
resetCommandBuffer
Instances
Eq CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles (==) :: CommandBuffer -> CommandBuffer -> Bool # (/=) :: CommandBuffer -> CommandBuffer -> Bool # | |
Show CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles showsPrec :: Int -> CommandBuffer -> ShowS # show :: CommandBuffer -> String # showList :: [CommandBuffer] -> ShowS # | |
Zero CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles zero :: CommandBuffer Source # | |
HasObjectType CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles objectTypeAndHandle :: CommandBuffer -> (ObjectType, Word64) Source # | |
IsHandle CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles |
newtype CommandBufferLevel Source #
pattern COMMAND_BUFFER_LEVEL_PRIMARY :: CommandBufferLevel |
|
pattern COMMAND_BUFFER_LEVEL_SECONDARY :: CommandBufferLevel |
|
Instances
newtype QueryControlFlagBits Source #
pattern QUERY_CONTROL_PRECISE_BIT :: QueryControlFlagBits |
|
Instances
newtype CommandBufferUsageFlagBits Source #
VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command buffer
See Also
pattern COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT :: CommandBufferUsageFlagBits |
|
pattern COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT :: CommandBufferUsageFlagBits |
|
pattern COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT :: CommandBufferUsageFlagBits |
|
Instances
newtype CommandBufferResetFlagBits Source #
VkCommandBufferResetFlagBits - Bitmask controlling behavior of a command buffer reset
See Also
pattern COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT :: CommandBufferResetFlagBits |
|