| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.CommandBuffer
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 #
Arguments
| :: 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 allocate multiple command
buffers. If the allocation of any of those command buffers fails, the
implementation must free all successfully allocated command buffer
objects from this command, set all entries of the pCommandBuffers
array to NULL and return the error.
Note
Filling pCommandBuffers with NULL values on failure is an exception
to the default error behavior that output parameters will have undefined
contents.
When command buffers are first allocated, they are in the initial state.
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pAllocateInfomust be a valid pointer to a validCommandBufferAllocateInfostructure -
pCommandBuffersmust be a valid pointer to an array ofpAllocateInfo->commandBufferCountCommandBufferhandles -
pAllocateInfo->commandBufferCountmust be greater than0
Host Synchronization
- Host access to
pAllocateInfo->commandPoolmust be externally synchronized
Return Codes
See Also
VK_VERSION_1_0,
CommandBuffer, CommandBufferAllocateInfo,
Device
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 last argument.
To just extract the pair pass (,) as the last argument.
Arguments
| :: 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
pCommandBuffersmust not be in the pending state
-
pCommandBuffersmust be a valid pointer to an array ofcommandBufferCountCommandBufferhandles, each element of which must either be a valid handle orNULL
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
commandPoolmust be a validCommandPoolhandle -
commandBufferCountmust be greater than0 -
commandPoolmust have been created, allocated, or retrieved fromdevice - Each element of
pCommandBuffersthat is a valid handle must have been created, allocated, or retrieved fromcommandPool
Host Synchronization
- Host access to
commandPoolmust be externally synchronized
- Host access to each member of
pCommandBuffersmust be externally synchronized
See Also
Arguments
| :: forall a io. (Extendss CommandBufferBeginInfo a, PokeChain a, MonadIO io) | |
| => CommandBuffer |
|
| -> CommandBufferBeginInfo a |
|
| -> io () |
vkBeginCommandBuffer - Start recording a command buffer
Valid Usage
-
commandBuffermust not be in the recording or pending state
- If
commandBufferwas allocated from aCommandPoolwhich did not have theCOMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BITflag set,commandBuffermust be in the initial state - If
commandBufferis a secondary command buffer, thepInheritanceInfomember ofpBeginInfomust be a validCommandBufferInheritanceInfostructure - If
commandBufferis a secondary command buffer and either theocclusionQueryEnablemember of thepInheritanceInfomember ofpBeginInfoisFALSE, or the precise occlusion queries feature is not enabled, thenpBeginInfo->pInheritanceInfo->queryFlagsmust not containQUERY_CONTROL_PRECISE_BIT - If
commandBufferis a primary command buffer, thenpBeginInfo->flagsmust not set both theCOMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BITand theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BITflags
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pBeginInfomust be a valid pointer to a validCommandBufferBeginInfostructure
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas 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.
Arguments
| :: 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
-
commandBuffermust be in the recording state
- If
commandBufferis a primary command buffer, there must not be an active render pass instance - All queries made
active
during the recording of
commandBuffermust have been made inactive - Conditional rendering must not be active
- If
commandBufferis a secondary command buffer, there must not be an outstandingcmdBeginDebugUtilsLabelEXTcommand recorded tocommandBufferthat has not previously been ended by a call tocmdEndDebugUtilsLabelEXT - If
commandBufferis a secondary command buffer, there must not be an outstandingcmdDebugMarkerBeginEXTcommand recorded tocommandBufferthat has not previously been ended by a call tocmdDebugMarkerEndEXT
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Return Codes
See Also
Arguments
| :: 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
-
commandBuffermust not be in the pending state
-
commandBuffermust have been allocated from a pool that was created with theCOMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
flagsmust be a valid combination ofCommandBufferResetFlagBitsvalues
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from 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
VK_VERSION_1_0,
CommandBufferLevel,
CommandPool,
StructureType,
allocateCommandBuffers
Constructors
| CommandBufferAllocateInfo | |
Fields
| |
Instances
data CommandBufferInheritanceInfo (es :: [Type]) Source #
VkCommandBufferInheritanceInfo - Structure specifying command buffer inheritance information
Description
If the CommandBuffer will not be executed within
a render pass instance, or if the render pass instance was begun with
cmdBeginRenderingKHR,
renderPass, subpass, and framebuffer are ignored.
Valid Usage
- If
the
inherited queries
feature is not enabled,
occlusionQueryEnablemust beFALSE
- If the
inherited queries
feature is enabled,
queryFlagsmust be a valid combination ofQueryControlFlagBitsvalues - If the
inherited queries
feature is not enabled,
queryFlagsmust be0 - If
the
pipeline statistics queries
feature is enabled,
pipelineStatisticsmust be a valid combination ofQueryPipelineStatisticFlagBitsvalues - If
the
pipeline statistics queries
feature is not enabled,
pipelineStatisticsmust be0
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofAttachmentSampleCountInfoAMD,CommandBufferInheritanceConditionalRenderingInfoEXT,CommandBufferInheritanceRenderPassTransformInfoQCOM,CommandBufferInheritanceRenderingInfoKHR,CommandBufferInheritanceViewportScissorInfoNV, orMultiviewPerViewAttributesInfoNVX - The
sTypevalue of each struct in thepNextchain must be unique - Both of
framebuffer, andrenderPassthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
VK_VERSION_1_0,
Bool32, CommandBufferBeginInfo,
Framebuffer,
QueryControlFlags,
QueryPipelineStatisticFlags,
RenderPass,
StructureType
Constructors
| CommandBufferInheritanceInfo | |
Fields
| |
Instances
data CommandBufferBeginInfo (es :: [Type]) Source #
VkCommandBufferBeginInfo - Structure specifying a command buffer begin operation
Valid Usage
- If
flagscontainsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, theframebuffermember ofpInheritanceInfomust be eitherNULL_HANDLE, or a validFramebufferthat is compatible with therenderPassmember ofpInheritanceInfo
- If
flagscontainsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BITand therenderPassmember ofpInheritanceInfois notNULL_HANDLE,renderPassmust be a validRenderPass - If
flagscontainsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BITand therenderPassmember ofpInheritanceInfois notNULL_HANDLE, thesubpassmember ofpInheritanceInfomust be a valid subpass index within therenderPassmember ofpInheritanceInfo - If
flagscontainsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BITand therenderPassmember ofpInheritanceInfoisNULL_HANDLE, thepNextchain ofpInheritanceInfomust include aCommandBufferInheritanceRenderingInfoKHRstructure - If
flagscontainsCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, therenderPassmember ofpInheritanceInfoisNULL_HANDLE, and thepNextchain ofpInheritanceInfoincludes aAttachmentSampleCountInfoAMDorAttachmentSampleCountInfoNVstructure, thecolorAttachmentCountmember of that structure must be equal to the value ofCommandBufferInheritanceRenderingInfoKHR::colorAttachmentCount
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
-
pNextmust beNULLor a pointer to a valid instance ofDeviceGroupCommandBufferBeginInfo - The
sTypevalue of each struct in thepNextchain must be unique -
flagsmust be a valid combination ofCommandBufferUsageFlagBitsvalues
See Also
VK_VERSION_1_0,
CommandBufferInheritanceInfo,
CommandBufferUsageFlags,
StructureType, beginCommandBuffer
Constructors
| CommandBufferBeginInfo | |
Fields
| |
Instances
data CommandBuffer Source #
VkCommandBuffer - Opaque handle to a command buffer object
See Also
VK_VERSION_1_0,
CommandBufferSubmitInfoKHR,
SubmitInfo,
allocateCommandBuffers,
beginCommandBuffer,
cmdBeginConditionalRenderingEXT,
cmdBeginDebugUtilsLabelEXT,
cmdBeginQuery,
cmdBeginQueryIndexedEXT,
cmdBeginRenderPass,
cmdBeginRenderPass2,
cmdBeginRenderPass2KHR,
cmdBeginRenderingKHR,
cmdBeginTransformFeedbackEXT,
vkCmdBeginVideoCodingKHR,
cmdBindDescriptorSets,
cmdBindIndexBuffer,
cmdBindInvocationMaskHUAWEI,
cmdBindPipeline,
cmdBindPipelineShaderGroupNV,
cmdBindShadingRateImageNV,
cmdBindTransformFeedbackBuffersEXT,
cmdBindVertexBuffers,
cmdBindVertexBuffers2EXT,
cmdBlitImage,
cmdBlitImage2KHR,
cmdBuildAccelerationStructureNV,
cmdBuildAccelerationStructuresIndirectKHR,
cmdBuildAccelerationStructuresKHR,
cmdClearAttachments,
cmdClearColorImage,
cmdClearDepthStencilImage,
vkCmdControlVideoCodingKHR,
cmdCopyAccelerationStructureKHR,
cmdCopyAccelerationStructureNV,
cmdCopyAccelerationStructureToMemoryKHR,
cmdCopyBuffer,
cmdCopyBuffer2KHR,
cmdCopyBufferToImage,
cmdCopyBufferToImage2KHR,
cmdCopyImage,
cmdCopyImage2KHR,
cmdCopyImageToBuffer,
cmdCopyImageToBuffer2KHR,
cmdCopyMemoryToAccelerationStructureKHR,
cmdCopyQueryPoolResults,
cmdCuLaunchKernelNVX,
cmdDebugMarkerBeginEXT,
cmdDebugMarkerEndEXT,
cmdDebugMarkerInsertEXT,
vkCmdDecodeVideoKHR,
cmdDispatch,
cmdDispatchBase,
cmdDispatchBaseKHR,
cmdDispatchIndirect,
cmdDraw,
cmdDrawIndexed,
cmdDrawIndexedIndirect,
cmdDrawIndexedIndirectCount,
cmdDrawIndexedIndirectCountAMD,
cmdDrawIndexedIndirectCountKHR,
cmdDrawIndirect,
cmdDrawIndirectByteCountEXT,
cmdDrawIndirectCount,
cmdDrawIndirectCountAMD,
cmdDrawIndirectCountKHR,
cmdDrawMeshTasksIndirectCountNV,
cmdDrawMeshTasksIndirectNV,
cmdDrawMeshTasksNV,
cmdDrawMultiEXT,
cmdDrawMultiIndexedEXT,
vkCmdEncodeVideoKHR,
cmdEndConditionalRenderingEXT,
cmdEndDebugUtilsLabelEXT,
cmdEndQuery,
cmdEndQueryIndexedEXT,
cmdEndRenderPass,
cmdEndRenderPass2,
cmdEndRenderPass2KHR,
cmdEndRenderingKHR,
cmdEndTransformFeedbackEXT,
vkCmdEndVideoCodingKHR,
cmdExecuteCommands,
cmdExecuteGeneratedCommandsNV,
cmdFillBuffer,
cmdInsertDebugUtilsLabelEXT,
cmdNextSubpass,
cmdNextSubpass2,
cmdNextSubpass2KHR,
cmdPipelineBarrier,
cmdPipelineBarrier2KHR,
cmdPreprocessGeneratedCommandsNV,
cmdPushConstants,
cmdPushDescriptorSetKHR,
cmdPushDescriptorSetWithTemplateKHR,
cmdResetEvent,
cmdResetEvent2KHR,
cmdResetQueryPool,
cmdResolveImage,
cmdResolveImage2KHR,
cmdSetBlendConstants,
cmdSetCheckpointNV,
cmdSetCoarseSampleOrderNV,
cmdSetColorWriteEnableEXT,
cmdSetCullModeEXT,
cmdSetDepthBias,
cmdSetDepthBiasEnableEXT,
cmdSetDepthBounds,
cmdSetDepthBoundsTestEnableEXT,
cmdSetDepthCompareOpEXT,
cmdSetDepthTestEnableEXT,
cmdSetDepthWriteEnableEXT,
cmdSetDeviceMask,
cmdSetDeviceMaskKHR,
cmdSetDiscardRectangleEXT,
cmdSetEvent,
cmdSetEvent2KHR,
cmdSetExclusiveScissorNV,
cmdSetFragmentShadingRateEnumNV,
cmdSetFragmentShadingRateKHR,
cmdSetFrontFaceEXT,
cmdSetLineStippleEXT,
cmdSetLineWidth,
cmdSetLogicOpEXT,
cmdSetPatchControlPointsEXT,
cmdSetPerformanceMarkerINTEL,
cmdSetPerformanceOverrideINTEL,
cmdSetPerformanceStreamMarkerINTEL,
cmdSetPrimitiveRestartEnableEXT,
cmdSetPrimitiveTopologyEXT,
cmdSetRasterizerDiscardEnableEXT,
cmdSetRayTracingPipelineStackSizeKHR,
cmdSetSampleLocationsEXT,
cmdSetScissor,
cmdSetScissorWithCountEXT,
cmdSetStencilCompareMask,
cmdSetStencilOpEXT,
cmdSetStencilReference,
cmdSetStencilTestEnableEXT,
cmdSetStencilWriteMask,
cmdSetVertexInputEXT,
cmdSetViewport,
cmdSetViewportShadingRatePaletteNV,
cmdSetViewportWScalingNV,
cmdSetViewportWithCountEXT,
cmdSubpassShadingHUAWEI,
cmdTraceRaysIndirectKHR,
cmdTraceRaysKHR,
cmdTraceRaysNV,
cmdUpdateBuffer,
cmdWaitEvents,
cmdWaitEvents2KHR,
cmdWriteAccelerationStructuresPropertiesKHR,
cmdWriteAccelerationStructuresPropertiesNV,
cmdWriteBufferMarker2AMD,
cmdWriteBufferMarkerAMD,
cmdWriteTimestamp,
cmdWriteTimestamp2KHR,
endCommandBuffer,
freeCommandBuffers,
resetCommandBuffer
Constructors
| CommandBuffer | |
Fields | |
Instances
| Eq CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles Methods (==) :: CommandBuffer -> CommandBuffer -> Bool # (/=) :: CommandBuffer -> CommandBuffer -> Bool # | |
| Show CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles Methods showsPrec :: Int -> CommandBuffer -> ShowS # show :: CommandBuffer -> String # showList :: [CommandBuffer] -> ShowS # | |
| Zero CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles Methods zero :: CommandBuffer Source # | |
| HasObjectType CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles Methods objectTypeAndHandle :: CommandBuffer -> (ObjectType, Word64) Source # | |
| IsHandle CommandBuffer Source # | |
Defined in Vulkan.Core10.Handles | |
newtype CommandBufferLevel Source #
VkCommandBufferLevel - Enumerant specifying a command buffer level
See Also
Constructors
| CommandBufferLevel Int32 |
Bundled Patterns
| pattern COMMAND_BUFFER_LEVEL_PRIMARY :: CommandBufferLevel |
|
| pattern COMMAND_BUFFER_LEVEL_SECONDARY :: CommandBufferLevel |
|
Instances
newtype QueryControlFlagBits Source #
VkQueryControlFlagBits - Bitmask specifying constraints on a query
See Also
Constructors
| QueryControlFlagBits Flags |
Bundled Patterns
| pattern QUERY_CONTROL_PRECISE_BIT :: QueryControlFlagBits |
|
Instances
newtype CommandBufferUsageFlagBits Source #
VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command buffer
See Also
Constructors
| CommandBufferUsageFlagBits Flags |
Bundled Patterns
| 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
Constructors
| CommandBufferResetFlagBits Flags |
Bundled Patterns
| pattern COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT :: CommandBufferResetFlagBits |
|