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

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Core10.CommandPool

  • 6 types
  • 4 values
  • Packagevulkan-3.27
  • Exports14
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceCommandPool.hs
valuecreateCommandPool
  1. :: (Extendss CommandPoolCreateInfo a, PokeChain a, MonadIO io)
  2. => Device

    device is the logical device that creates the command pool.

  3. -> CommandPoolCreateInfo a

    pCreateInfo is a pointer to a CommandPoolCreateInfo structure specifying the state of the command pool object.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io CommandPool
#

vkCreateCommandPool - Create a new command pool object

Valid Usage

  • pCreateInfo->queueFamilyIndex must be the index of a queue family available in the logical device device

Valid Usage (Implicit)

  • device must be a valid Device handle

  • pCreateInfo must be a valid pointer to a valid CommandPoolCreateInfo structure

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • pCommandPool must be a valid pointer to a CommandPool handle

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

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, AllocationCallbacks, CommandPool, CommandPoolCreateInfo, Device

A convenience wrapper to make a compatible pair of calls to createCommandPool and destroyCommandPool

To ensure that destroyCommandPool 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.

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

    device is the logical device that destroys the command pool.

  3. -> CommandPool

    commandPool is the handle of the command pool to destroy.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io ()
#

vkDestroyCommandPool - Destroy a command pool object

Description

When a pool is destroyed, all command buffers allocated from the pool are freed.

Any primary command buffer allocated from another CommandPool that is in the recording or executable state and has a secondary command buffer allocated from commandPool recorded into it, becomes invalid.

Valid Usage

  • If AllocationCallbacks were provided when commandPool was created, a compatible set of callbacks must be provided here

  • If no AllocationCallbacks were provided when commandPool was created, pAllocator must be NULL

Valid Usage (Implicit)

  • device must be a valid Device handle

  • If commandPool is not NULL_HANDLE, commandPool must be a valid CommandPool handle

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • If commandPool is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to commandPool must be externally synchronized

See Also

VK_VERSION_1_0, AllocationCallbacks, CommandPool, Device

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

    device is the logical device that owns the command pool.

  3. -> CommandPool

    commandPool is the command pool to reset.

  4. -> CommandPoolResetFlags

    flags is a bitmask of CommandPoolResetFlagBits controlling the reset operation.

  5. -> io ()
#

vkResetCommandPool - Reset a command pool

Description

Resetting a command pool recycles all of the resources from all of the command buffers allocated from the command pool back to the command pool. All command buffers that have been allocated from the command pool are put in the initial state.

Any primary command buffer allocated from another CommandPool that is in the recording or executable state and has a secondary command buffer allocated from commandPool recorded into it, becomes invalid.

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

  • commandPool must be a valid CommandPool handle

  • flags must be a valid combination of CommandPoolResetFlagBits values

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

Host Synchronization

  • Host access to commandPool must be externally synchronized

Return Codes

Success
Failure

See Also

VK_VERSION_1_0, CommandPool, CommandPoolResetFlags, Device

datadata CommandPoolCreateInfo (es :: [Type])
#

VkCommandPoolCreateInfo - Structure specifying parameters of a newly created command pool

Valid Usage

Valid Usage (Implicit)

See Also

VK_VERSION_1_0, CommandPoolCreateFlags, StructureType, createCommandPool

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero
newtypenewtype CommandPool
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype CommandPoolCreateFlagBits
#

VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command pool

Description

  • COMMAND_POOL_CREATE_TRANSIENT_BIT specifies that command buffers allocated from the pool will be short-lived, meaning that they will be reset or freed in a relatively short timeframe. This flag may be used by the implementation to control memory allocation behavior within the pool.

See Also

VK_VERSION_1_0, CommandPoolCreateFlags

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

VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool reset

Description

See Also

VK_VERSION_1_0, CommandPoolResetFlags

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