Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- createCommandPool :: Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO CommandPool
- withCommandPool :: Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (CommandPool -> IO r) -> IO r
- destroyCommandPool :: Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO ()
- resetCommandPool :: Device -> CommandPool -> CommandPoolResetFlags -> IO ()
- data CommandPoolCreateInfo = CommandPoolCreateInfo {}
Documentation
createCommandPool :: Device -> CommandPoolCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> IO CommandPool Source #
vkCreateCommandPool - Create a new command pool object
Parameters
Device
is the logical device that creates the command pool.
pCreateInfo
is a pointer to aCommandPoolCreateInfo
structure specifying the state of the command pool object.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pCommandPool
is a pointer to aCommandPool
handle in which the created pool is returned.
Valid Usage
pCreateInfo->queueFamilyIndex
must be the index of a queue family available in the logical deviceDevice
.
Valid Usage (Implicit)
pCreateInfo
must be a valid pointer to a validCommandPoolCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pCommandPool
must be a valid pointer to aCommandPool
handle
Return Codes
See Also
AllocationCallbacks
,
CommandPool
, CommandPoolCreateInfo
,
Device
withCommandPool :: Device -> CommandPoolCreateInfo -> Maybe AllocationCallbacks -> (CommandPool -> IO r) -> IO r Source #
A safe wrapper for createCommandPool
and destroyCommandPool
using
bracket
The allocated value must not be returned from the provided computation
destroyCommandPool :: Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> IO () Source #
vkDestroyCommandPool - Destroy a command pool object
Parameters
Device
is the logical device that destroys the command pool.
CommandPool
is the handle of the command pool to destroy.pAllocator
controls 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
CommandBuffer
objects allocated fromCommandPool
must not be in the pending state.
- If
AllocationCallbacks
were provided whenCommandPool
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenCommandPool
was created,pAllocator
must beNULL
Valid Usage (Implicit)
- If
CommandPool
is notNULL_HANDLE
,CommandPool
must be a validCommandPool
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
CommandPool
is a valid handle, it must have been created, allocated, or retrieved fromDevice
Host Synchronization
- Host access to
CommandPool
must be externally synchronized
See Also
resetCommandPool :: Device -> CommandPool -> CommandPoolResetFlags -> IO () Source #
vkResetCommandPool - Reset a command pool
Parameters
Device
is the logical device that owns the command pool.
CommandPool
is the command pool to reset.Flags
is a bitmask ofCommandPoolResetFlagBits
controlling 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
CommandBuffer
objects allocated fromCommandPool
must not be in the pending state
Valid Usage (Implicit)
CommandPool
must be a validCommandPool
handleFlags
must be a valid combination ofCommandPoolResetFlagBits
valuesCommandPool
must have been created, allocated, or retrieved fromDevice
Host Synchronization
- Host access to
CommandPool
must 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_BIT
bit ofFlags
must not be set.
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
pNext
must beNULL
Flags
must be a valid combination ofCommandPoolCreateFlagBits
values
See Also
CommandPoolCreateInfo | |
|