HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Core10.CommandBuffer

  • 11 types
  • 7 values
  • Packagevulkan-3.27
  • Exports25
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceCommandBuffer.hs
valueallocateCommandBuffers
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the command pool.

  3. -> CommandBufferAllocateInfo

    pAllocateInfo is a pointer to a CommandBufferAllocateInfo structure describing parameters of the allocation. commandPool may be accessed any time one of the resulting command buffers is accessed.

  4. -> 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.

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)

  • device must be a valid Device handle

  • pAllocateInfo must be a valid pointer to a valid CommandBufferAllocateInfo structure

  • pCommandBuffers must be a valid pointer to an array of pAllocateInfo->commandBufferCount CommandBuffer handles

  • The device must have been created with at least 1 queue

  • pAllocateInfo->commandBufferCount must be greater than 0

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, CommandBuffer, CommandBufferAllocateInfo, Device

valuefreeCommandBuffers
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the command pool.

  3. -> CommandPool

    commandPool is the command pool from which the command buffers were allocated.

  4. -> "commandBuffers" ::: Vector CommandBuffer

    pCommandBuffers is a pointer to an array of handles of command buffers to free.

  5. -> 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 of commandBufferCount CommandBuffer handles, each element of which must either be a valid handle or NULL

Valid Usage (Implicit)

  • device must be a valid Device handle

  • commandPool must be a valid CommandPool handle

  • commandBufferCount must be greater than 0

  • commandPool must have been created, allocated, or retrieved from device

  • Each element of pCommandBuffers that is a valid handle must have been created, allocated, or retrieved from commandPool

Host Synchronization

  • Host access to commandPool must be externally synchronized

  • Host access to each member of pCommandBuffers must be externally synchronized

See Also

VK_VERSION_1_0, CommandBuffer, CommandPool, Device

valuebeginCommandBuffer
  1. :: (Extendss CommandBufferBeginInfo a, PokeChain a, MonadIO io)
  2. => CommandBuffer

    commandBuffer is the handle of the command buffer which is to be put in the recording state.

  3. -> CommandBufferBeginInfo a

    pBeginInfo is a pointer to a CommandBufferBeginInfo structure defining additional information about how the command buffer begins recording.

  4. -> io ()
#

vkBeginCommandBuffer - Start recording a command buffer

Valid Usage

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, CommandBuffer, CommandBufferBeginInfo

valueendCommandBuffer
  1. :: MonadIO io
  2. => CommandBuffer

    commandBuffer is the command buffer to complete recording.

  3. -> io ()
#

vkEndCommandBuffer - Finish recording a command buffer

Description

The command buffer must have been in the recording state, and, if successful, is moved to the executable state.

If there was an error during recording, the application will be notified by an unsuccessful return code returned by endCommandBuffer, and the command buffer will be moved to the invalid state.

In case the application recorded one or more video encode operations into the command buffer, implementations may return the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error if any of the specified Video Std parameters do not adhere to the syntactic or semantic requirements of the used video compression standard, or if values derived from parameters according to the rules defined by the used video compression standard do not adhere to the capabilities of the video compression standard or the implementation.

Applications should not rely on the VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR error being returned by any command as a means to verify Video Std parameters, as implementations are not required to report the error in any specific set of cases.

Valid Usage

  • 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

  • There must be no video session object bound

  • If commandBuffer is a secondary command buffer, there must not be an outstanding cmdBeginDebugUtilsLabelEXT command recorded to commandBuffer that has not previously been ended by a call to cmdEndDebugUtilsLabelEXT

  • If commandBuffer is a secondary command buffer, there must not be an outstanding cmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to cmdDebugMarkerEndEXT

  • commandBuffer must not have any shader instrumentation active

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, CommandBuffer

valueresetCommandBuffer
  1. :: MonadIO io
  2. => CommandBuffer

    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.

  3. -> CommandBufferResetFlags

    flags is a bitmask of CommandBufferResetFlagBits controlling the reset operation.

  4. -> 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.

After a command buffer is reset, any objects or memory specified by commands recorded into the command buffer must no longer be accessed when the command buffer is accessed by the implementation.

Valid Usage

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, CommandBuffer, CommandBufferResetFlags

VkCommandBufferAllocateInfo - Structure specifying the allocation parameters for command buffer object

Valid Usage (Implicit)

Host Synchronization

  • Host access to commandPool must be externally synchronized

See Also

VK_VERSION_1_0, CommandBufferLevel, CommandPool, StructureType, allocateCommandBuffers

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
datadata CommandBufferInheritanceInfo (es :: [Type])
#

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 cmdBeginRendering, renderPass, subpass, and framebuffer are ignored.

Valid Usage

Valid Usage (Implicit)

See Also

VK_VERSION_1_0, Bool32, CommandBufferBeginInfo, Framebuffer, QueryControlFlags, QueryPipelineStatisticFlags, RenderPass, StructureType

Constructors

  • CommandBufferInheritanceInfo
    • next :: Chain es

      pNext is NULL or a pointer to a structure extending this structure.

    • renderPass :: RenderPass

      renderPass is a RenderPass object defining which render passes the CommandBuffer will be compatible with and can be executed within.

    • subpass :: Word32

      subpass is the index of the subpass within the render pass instance that the CommandBuffer will be executed within.

    • framebuffer :: Framebuffer

      framebuffer can refer to the Framebuffer object that the CommandBuffer will be rendering to if it is executed within a render pass instance. It can be NULL_HANDLE if the framebuffer is not known.

      Specifying the exact framebuffer that the secondary command buffer will be executed with may result in better performance at command buffer execution time.

    • occlusionQueryEnable :: Bool

      occlusionQueryEnable specifies whether the command buffer can be executed while an occlusion query is active in the primary command buffer. If this is TRUE, then this command buffer can be executed whether the primary command buffer has an occlusion query active or not. If this is FALSE, then the primary command buffer must not have an occlusion query active.

    • queryFlags :: QueryControlFlags

      queryFlags specifies the query flags that can be used by an active occlusion query in the primary command buffer when this secondary command buffer is executed. If this value includes the QUERY_CONTROL_PRECISE_BIT bit, then the active query can return boolean results or actual sample counts. If this bit is not set, then the active query must not use the QUERY_CONTROL_PRECISE_BIT bit.

    • pipelineStatistics :: QueryPipelineStatisticFlags

      pipelineStatistics is a bitmask of QueryPipelineStatisticFlagBits specifying the set of pipeline statistics that can be counted by an active query in the primary command buffer when this secondary command buffer is executed. If this value includes a given bit, then this command buffer can be executed whether the primary command buffer has a pipeline statistics query active that includes this bit or not. If this value excludes a given bit, then the active pipeline statistics query must not be from a query pool that counts that statistic.

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero
datadata CommandBufferBeginInfo (es :: [Type])
#

VkCommandBufferBeginInfo - Structure specifying a command buffer begin operation

Valid Usage

Valid Usage (Implicit)

See Also

VK_VERSION_1_0, CommandBufferInheritanceInfo, CommandBufferUsageFlags, StructureType, beginCommandBuffer

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero
datadata CommandBuffer
#

VkCommandBuffer - Opaque handle to a command buffer object

See Also

VK_DEFINE_HANDLE, VK_VERSION_1_0, CommandBufferSubmitInfo, SubmitInfo, allocateCommandBuffers, beginCommandBuffer, cmdBeginConditionalRendering2EXT, cmdBeginConditionalRenderingEXT, cmdBeginCustomResolveEXT, cmdBeginDebugUtilsLabelEXT, cmdBeginGpaSampleAMD, cmdBeginGpaSessionAMD, cmdBeginPerTileExecutionQCOM, cmdBeginQuery, cmdBeginQueryIndexedEXT, cmdBeginRenderPass, cmdBeginRenderPass2, cmdBeginRenderPass2, cmdBeginRendering, cmdBeginRendering, cmdBeginShaderInstrumentationARM, cmdBeginTransformFeedback2EXT, cmdBeginTransformFeedbackEXT, vkCmdBeginVideoCodingKHR, cmdBindDescriptorBufferEmbeddedSamplers2EXT, cmdBindDescriptorBufferEmbeddedSamplersEXT, cmdBindDescriptorBuffersEXT, cmdBindDescriptorSets, cmdBindDescriptorSets2, cmdBindDescriptorSets2, cmdBindIndexBuffer, cmdBindIndexBuffer2, cmdBindIndexBuffer2, cmdBindIndexBuffer3KHR, cmdBindInvocationMaskHUAWEI, cmdBindPipeline, cmdBindPipelineShaderGroupNV, cmdBindResourceHeapEXT, cmdBindSamplerHeapEXT, cmdBindShadersEXT, cmdBindShadingRateImageNV, cmdBindTileMemoryQCOM, cmdBindTransformFeedbackBuffers2EXT, cmdBindTransformFeedbackBuffersEXT, cmdBindVertexBuffers, cmdBindVertexBuffers2, cmdBindVertexBuffers2, cmdBindVertexBuffers3KHR, cmdBlitImage, cmdBlitImage2, cmdBlitImage2, cmdBuildAccelerationStructureNV, cmdBuildAccelerationStructuresIndirectKHR, cmdBuildAccelerationStructuresKHR, vkCmdBuildClusterAccelerationStructureIndirectNV, cmdBuildMicromapsEXT, vkCmdBuildPartitionedAccelerationStructuresNV, cmdClearAttachments, cmdClearColorImage, cmdClearDepthStencilImage, vkCmdControlVideoCodingKHR, cmdConvertCooperativeVectorMatrixNV, cmdCopyAccelerationStructureKHR, cmdCopyAccelerationStructureNV, cmdCopyAccelerationStructureToMemoryKHR, cmdCopyBuffer, cmdCopyBuffer2, cmdCopyBuffer2, cmdCopyBufferToImage, cmdCopyBufferToImage2, cmdCopyBufferToImage2, cmdCopyGpaSessionResultsAMD, cmdCopyImage, cmdCopyImage2, cmdCopyImage2, cmdCopyImageToBuffer, cmdCopyImageToBuffer2, cmdCopyImageToBuffer2, cmdCopyImageToMemoryKHR, cmdCopyMemoryIndirectKHR, cmdCopyMemoryIndirectNV, cmdCopyMemoryKHR, cmdCopyMemoryToAccelerationStructureKHR, cmdCopyMemoryToImageIndirectKHR, cmdCopyMemoryToImageIndirectNV, cmdCopyMemoryToImageKHR, cmdCopyMemoryToMicromapEXT, cmdCopyMicromapEXT, cmdCopyMicromapToMemoryEXT, cmdCopyQueryPoolResults, cmdCopyQueryPoolResultsToMemoryKHR, cmdCopyTensorARM, cmdCuLaunchKernelNVX, cmdCudaLaunchKernelNV, cmdDebugMarkerBeginEXT, cmdDebugMarkerEndEXT, cmdDebugMarkerInsertEXT, vkCmdDecodeVideoKHR, cmdDecompressMemoryEXT, cmdDecompressMemoryIndirectCountEXT, cmdDecompressMemoryIndirectCountNV, cmdDecompressMemoryNV, cmdDispatch, cmdDispatchBase, cmdDispatchBase, cmdDispatchDataGraphARM, cmdDispatchGraphAMDX, cmdDispatchGraphIndirectAMDX, cmdDispatchGraphIndirectCountAMDX, cmdDispatchIndirect, cmdDispatchIndirect2KHR, cmdDispatchTileQCOM, cmdDraw, cmdDrawClusterHUAWEI, cmdDrawClusterIndirectHUAWEI, cmdDrawIndexed, cmdDrawIndexedIndirect, cmdDrawIndexedIndirect2KHR, cmdDrawIndexedIndirectCount, cmdDrawIndexedIndirectCount2KHR, cmdDrawIndexedIndirectCount, cmdDrawIndexedIndirectCount, cmdDrawIndirect, cmdDrawIndirect2KHR, cmdDrawIndirectByteCount2EXT, cmdDrawIndirectByteCountEXT, cmdDrawIndirectCount, cmdDrawIndirectCount2KHR, cmdDrawIndirectCount, cmdDrawIndirectCount, cmdDrawMeshTasksEXT, cmdDrawMeshTasksIndirect2EXT, cmdDrawMeshTasksIndirectCount2EXT, cmdDrawMeshTasksIndirectCountEXT, cmdDrawMeshTasksIndirectCountNV, cmdDrawMeshTasksIndirectEXT, cmdDrawMeshTasksIndirectNV, cmdDrawMeshTasksNV, cmdDrawMultiEXT, cmdDrawMultiIndexedEXT, vkCmdEncodeVideoKHR, cmdEndConditionalRenderingEXT, cmdEndDebugUtilsLabelEXT, cmdEndGpaSampleAMD, cmdEndGpaSessionAMD, cmdEndPerTileExecutionQCOM, cmdEndQuery, cmdEndQueryIndexedEXT, cmdEndRenderPass, cmdEndRenderPass2, cmdEndRenderPass2, cmdEndRendering, cmdEndRendering2KHR, cmdEndRendering2KHR, cmdEndRendering, cmdEndShaderInstrumentationARM, cmdEndTransformFeedback2EXT, cmdEndTransformFeedbackEXT, vkCmdEndVideoCodingKHR, cmdExecuteCommands, cmdExecuteGeneratedCommandsEXT, cmdExecuteGeneratedCommandsNV, cmdFillBuffer, cmdFillMemoryKHR, cmdInitializeGraphScratchMemoryAMDX, cmdInsertDebugUtilsLabelEXT, cmdNextSubpass, cmdNextSubpass2, cmdNextSubpass2, cmdOpticalFlowExecuteNV, cmdPipelineBarrier, cmdPipelineBarrier2, cmdPipelineBarrier2, cmdPreprocessGeneratedCommandsEXT, cmdPreprocessGeneratedCommandsNV, cmdPushConstants, cmdPushConstants2, cmdPushConstants2, cmdPushDataEXT, cmdPushDescriptorSet, cmdPushDescriptorSet2, cmdPushDescriptorSet2, cmdPushDescriptorSet, cmdPushDescriptorSetWithTemplate, cmdPushDescriptorSetWithTemplate2, cmdPushDescriptorSetWithTemplate2, cmdPushDescriptorSetWithTemplate, cmdResetEvent, cmdResetEvent2, cmdResetEvent2, cmdResetQueryPool, cmdResolveImage, cmdResolveImage2, cmdResolveImage2, cmdSetAlphaToCoverageEnableEXT, cmdSetAlphaToOneEnableEXT, cmdSetAttachmentFeedbackLoopEnableEXT, cmdSetBlendConstants, cmdSetCheckpointNV, cmdSetCoarseSampleOrderNV, cmdSetColorBlendAdvancedEXT, cmdSetColorBlendEnableEXT, cmdSetColorBlendEquationEXT, cmdSetColorWriteEnableEXT, cmdSetColorWriteMaskEXT, cmdSetComputeOccupancyPriorityNV, cmdSetConservativeRasterizationModeEXT, cmdSetCoverageModulationModeNV, cmdSetCoverageModulationTableEnableNV, cmdSetCoverageModulationTableNV, cmdSetCoverageReductionModeNV, cmdSetCoverageToColorEnableNV, cmdSetCoverageToColorLocationNV, cmdSetCullMode, cmdSetCullMode, cmdSetDepthBias, cmdSetDepthBias2EXT, cmdSetDepthBiasEnable, cmdSetDepthBiasEnable, cmdSetDepthBounds, cmdSetDepthBoundsTestEnable, cmdSetDepthBoundsTestEnable, cmdSetDepthClampEnableEXT, cmdSetDepthClampRangeEXT, cmdSetDepthClipEnableEXT, cmdSetDepthClipNegativeOneToOneEXT, cmdSetDepthCompareOp, cmdSetDepthCompareOp, cmdSetDepthTestEnable, cmdSetDepthTestEnable, cmdSetDepthWriteEnable, cmdSetDepthWriteEnable, cmdSetDescriptorBufferOffsets2EXT, cmdSetDescriptorBufferOffsetsEXT, cmdSetDeviceMask, cmdSetDeviceMask, cmdSetDiscardRectangleEXT, cmdSetDiscardRectangleEnableEXT, cmdSetDiscardRectangleModeEXT, cmdSetDispatchParametersARM, cmdSetEvent, cmdSetEvent2, cmdSetEvent2, cmdSetExclusiveScissorEnableNV, cmdSetExclusiveScissorNV, cmdSetExtraPrimitiveOverestimationSizeEXT, cmdSetFragmentShadingRateEnumNV, cmdSetFragmentShadingRateKHR, cmdSetFrontFace, cmdSetFrontFace, cmdSetLineRasterizationModeEXT, cmdSetLineStipple, cmdSetLineStipple, cmdSetLineStippleEnableEXT, cmdSetLineStipple, cmdSetLineWidth, cmdSetLogicOpEXT, cmdSetLogicOpEnableEXT, cmdSetPatchControlPointsEXT, cmdSetPerformanceMarkerINTEL, cmdSetPerformanceOverrideINTEL, cmdSetPerformanceStreamMarkerINTEL, cmdSetPolygonModeEXT, cmdSetPrimitiveRestartEnable, cmdSetPrimitiveRestartEnable, cmdSetPrimitiveRestartIndexEXT, cmdSetPrimitiveTopology, cmdSetPrimitiveTopology, cmdSetProvokingVertexModeEXT, cmdSetRasterizationSamplesEXT, cmdSetRasterizationStreamEXT, cmdSetRasterizerDiscardEnable, cmdSetRasterizerDiscardEnable, cmdSetRayTracingPipelineStackSizeKHR, cmdSetRenderingAttachmentLocations, cmdSetRenderingAttachmentLocations, cmdSetRenderingInputAttachmentIndices, cmdSetRenderingInputAttachmentIndices, cmdSetRepresentativeFragmentTestEnableNV, cmdSetSampleLocationsEXT, cmdSetSampleLocationsEnableEXT, cmdSetSampleMaskEXT, cmdSetScissor, cmdSetScissorWithCount, cmdSetScissorWithCount, cmdSetShadingRateImageEnableNV, cmdSetStencilCompareMask, cmdSetStencilOp, cmdSetStencilOp, cmdSetStencilReference, cmdSetStencilTestEnable, cmdSetStencilTestEnable, cmdSetStencilWriteMask, cmdSetTessellationDomainOriginEXT, cmdSetVertexInputEXT, cmdSetViewport, cmdSetViewportShadingRatePaletteNV, cmdSetViewportSwizzleNV, cmdSetViewportWScalingEnableNV, cmdSetViewportWScalingNV, cmdSetViewportWithCount, cmdSetViewportWithCount, cmdSubpassShadingHUAWEI, cmdTraceRaysIndirect2KHR, cmdTraceRaysIndirectKHR, cmdTraceRaysKHR, cmdTraceRaysNV, cmdUpdateBuffer, cmdUpdateMemoryKHR, cmdUpdatePipelineIndirectBufferNV, cmdWaitEvents, cmdWaitEvents2, cmdWaitEvents2, cmdWriteAccelerationStructuresPropertiesKHR, cmdWriteAccelerationStructuresPropertiesNV, cmdWriteBufferMarker2AMD, cmdWriteBufferMarkerAMD, cmdWriteMarkerToMemoryAMD, cmdWriteMicromapsPropertiesEXT, cmdWriteTimestamp, cmdWriteTimestamp2, cmdWriteTimestamp2, endCommandBuffer, freeCommandBuffers, resetCommandBuffer

Instances5Eq, Show, HasObjectType, IsHandle, Zero
newtypenewtype CommandBufferLevel
#

VkCommandBufferLevel - Enumerant specifying a command buffer level

Description

See Also

VK_VERSION_1_0, CommandBufferAllocateInfo

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype QueryControlFlagBits
#

VkQueryControlFlagBits - Bitmask specifying constraints on a query

Description

See Also

VK_VERSION_1_0, QueryControlFlags

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …
newtypenewtype CommandBufferUsageFlagBits
#

VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command buffer

Description

  • COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT specifies that each recording of the command buffer will only be submitted once, and the command buffer will be reset and recorded again between each submission.

See Also

VK_VERSION_1_0, CommandBufferUsageFlags

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …
newtypenewtype CommandBufferResetFlagBits
#

VkCommandBufferResetFlagBits - Bitmask controlling behavior of a command buffer reset

Description

  • COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT specifies that most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands. commandBuffer is moved to the initial state.

See Also

VK_VERSION_1_0, CommandBufferResetFlags

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …