| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Vulkan.Core10.CommandPool
Synopsis
- createCommandPool :: forall io. MonadIO io => Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io CommandPool
- withCommandPool :: forall io r. MonadIO io => Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (io CommandPool -> (CommandPool -> io ()) -> r) -> r
- destroyCommandPool :: forall io. MonadIO io => Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- resetCommandPool :: forall io. MonadIO io => Device -> CommandPool -> CommandPoolResetFlags -> io ()
- data CommandPoolCreateInfo = CommandPoolCreateInfo {}
Documentation
createCommandPool :: forall io. MonadIO io => Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io CommandPool Source #
vkCreateCommandPool - Create a new command pool object
Parameters
- deviceis the logical device that creates the command pool.
- pCreateInfois a pointer to a- CommandPoolCreateInfostructure specifying the state of the command pool object.
- pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
- pCommandPoolis a pointer to a- CommandPoolhandle in which the created pool is returned.
Valid Usage
- pCreateInfo->queueFamilyIndexmust be the index of a queue family available in the logical device- device
Valid Usage (Implicit)
- devicemust be a valid- Devicehandle
- pCreateInfomust be a valid pointer to a valid- CommandPoolCreateInfostructure
- If pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure
- pCommandPoolmust be a valid pointer to a- CommandPoolhandle
Return Codes
See Also
AllocationCallbacks,
 CommandPool, CommandPoolCreateInfo,
 Device
withCommandPool :: forall io r. MonadIO io => Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (io CommandPool -> (CommandPool -> io ()) -> r) -> r Source #
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 first argument.
 To just extract the pair pass (,) as the first argument.
destroyCommandPool :: forall io. MonadIO io => Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyCommandPool - Destroy a command pool object
Parameters
- deviceis the logical device that destroys the command pool.
- commandPoolis the handle of the command pool to destroy.
- pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
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
- All CommandBufferobjects allocated fromcommandPoolmust not be in the pending state
- If AllocationCallbackswere provided whencommandPoolwas created, a compatible set of callbacks must be provided here
- If no AllocationCallbackswere provided whencommandPoolwas created,pAllocatormust beNULL
Valid Usage (Implicit)
- devicemust be a valid- Devicehandle
- If commandPoolis notNULL_HANDLE,commandPoolmust be a validCommandPoolhandle
- If pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure
- If commandPoolis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to commandPoolmust be externally synchronized
See Also
resetCommandPool :: forall io. MonadIO io => Device -> CommandPool -> CommandPoolResetFlags -> io () Source #
vkResetCommandPool - Reset a command pool
Parameters
- deviceis the logical device that owns the command pool.
- commandPoolis the command pool to reset.
- flagsis a bitmask of- CommandPoolResetFlagBitscontrolling the reset operation.
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
- All CommandBufferobjects allocated fromcommandPoolmust not be in the pending state
Valid Usage (Implicit)
- devicemust be a valid- Devicehandle
- commandPoolmust be a valid- CommandPoolhandle
- flagsmust be a valid combination of- CommandPoolResetFlagBitsvalues
- commandPoolmust have been created, allocated, or retrieved from- device
Host Synchronization
- Host access to commandPoolmust be externally synchronized
Return Codes
See Also
data CommandPoolCreateInfo Source #
VkCommandPoolCreateInfo - Structure specifying parameters of a newly created command pool
Valid Usage
- If the protected memory feature is not enabled, the
     COMMAND_POOL_CREATE_PROTECTED_BITbit offlagsmust not be set
Valid Usage (Implicit)
- sTypemust be- STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
- pNextmust be- NULL
- flagsmust be a valid combination of- CommandPoolCreateFlagBitsvalues
See Also
Constructors
| CommandPoolCreateInfo | |
| Fields 
 | |