| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.CommandPool
Synopsis
- createCommandPool :: forall (a :: [Type]) io. (Extendss CommandPoolCreateInfo a, PokeChain a, MonadIO io) => Device -> CommandPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io CommandPool
- withCommandPool :: forall (a :: [Type]) io r. (Extendss CommandPoolCreateInfo a, PokeChain a, MonadIO io) => Device -> CommandPoolCreateInfo a -> Maybe AllocationCallbacks -> (io CommandPool -> (CommandPool -> io ()) -> r) -> r
- destroyCommandPool :: MonadIO io => Device -> CommandPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- resetCommandPool :: MonadIO io => Device -> CommandPool -> CommandPoolResetFlags -> io ()
- data CommandPoolCreateInfo (es :: [Type]) = CommandPoolCreateInfo {
- next :: Chain es
- flags :: CommandPoolCreateFlags
- queueFamilyIndex :: Word32
- newtype CommandPool = CommandPool Word64
- newtype CommandPoolCreateFlagBits where
- type CommandPoolCreateFlags = CommandPoolCreateFlagBits
- newtype CommandPoolResetFlagBits where
- type CommandPoolResetFlags = CommandPoolResetFlagBits
Documentation
Arguments
| :: forall (a :: [Type]) io. (Extendss CommandPoolCreateInfo a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> CommandPoolCreateInfo a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io CommandPool |
vkCreateCommandPool - Create a new command pool object
Valid Usage
-
pCreateInfo->queueFamilyIndexmust be the index of a queue family available in the logical devicedevice
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
pCreateInfomust be a valid pointer to a validCommandPoolCreateInfostructure - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure -
pCommandPoolmust be a valid pointer to aCommandPoolhandle - The device must have
been created with at least
1queue
Return Codes
See Also
VK_VERSION_1_0,
AllocationCallbacks,
CommandPool, CommandPoolCreateInfo,
Device
withCommandPool :: forall (a :: [Type]) io r. (Extendss CommandPoolCreateInfo a, PokeChain a, MonadIO io) => Device -> CommandPoolCreateInfo a -> 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 last argument.
To just extract the pair pass (,) as the last argument.
Arguments
| :: MonadIO io | |
| => Device |
|
| -> CommandPool |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> 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
- 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 validDevicehandle
- 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
Arguments
| :: MonadIO io | |
| => Device |
|
| -> CommandPool |
|
| -> CommandPoolResetFlags |
|
| -> 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
- All
CommandBufferobjects allocated fromcommandPoolmust not be in the pending state
Valid Usage (Implicit)
-
devicemust be a validDevicehandle
-
commandPoolmust be a validCommandPoolhandle -
flagsmust be a valid combination ofCommandPoolResetFlagBitsvalues -
commandPoolmust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
commandPoolmust be externally synchronized
Return Codes
See Also
data CommandPoolCreateInfo (es :: [Type]) Source #
VkCommandPoolCreateInfo - Structure specifying parameters of a newly created command pool
Valid Usage
- If the
protectedMemory
feature is not enabled, the
COMMAND_POOL_CREATE_PROTECTED_BITbit offlagsmust not be set
- If the
pNextchain includes aDataGraphProcessingEngineCreateInfoARMstructure, thenqueueFamilyIndexmust designate a queue family that supportsQUEUE_DATA_GRAPH_BIT_ARM - If the
pNextchain includes aDataGraphProcessingEngineCreateInfoARMstructure, each member ofpProcessingEnginesmust be identical toQueueFamilyDataGraphPropertiesARM::engineretrieved fromgetPhysicalDeviceQueueFamilyDataGraphPropertiesARMwithqueueFamilyIndexand thephysicalDevicethat was used to createdevice - If
queueFamilyIndexdesignates a queue family that supportsQUEUE_DATA_GRAPH_BIT_ARMand enumerates a foreign engine throughgetPhysicalDeviceQueueFamilyDataGraphPropertiesARMwith typePHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_NEURAL_QCOMorPHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_COMPUTE_QCOM, thepNextchain must includeDataGraphProcessingEngineCreateInfoARMwithPhysicalDeviceDataGraphProcessingEngineARM::isForeignset toTRUEfor all elements ofpProcessingEngines
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
-
pNextmust beNULLor a pointer to a valid instance ofDataGraphProcessingEngineCreateInfoARM - The
sTypevalue of each structure in thepNextchain must be unique -
flagsmust be a valid combination ofCommandPoolCreateFlagBitsvalues
See Also
VK_VERSION_1_0,
CommandPoolCreateFlags,
StructureType, createCommandPool
Constructors
| CommandPoolCreateInfo | |
Fields
| |
Instances
newtype CommandPool Source #
VkCommandPool - Opaque handle to a command pool object
See Also
VK_DEFINE_NON_DISPATCHABLE_HANDLE,
VK_VERSION_1_0,
CommandBufferAllocateInfo,
createCommandPool,
destroyCommandPool,
freeCommandBuffers,
resetCommandPool,
trimCommandPool,
trimCommandPool
Constructors
| CommandPool Word64 |
Instances
newtype CommandPoolCreateFlagBits Source #
VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command pool
Description
COMMAND_POOL_CREATE_TRANSIENT_BITspecifies 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.
COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BITallows any command buffer allocated from a pool to be individually reset to the initial state; either by callingresetCommandBuffer, or via the implicit reset when callingbeginCommandBuffer. If this flag is not set on a pool, thenresetCommandBuffermust not be called for any command buffer allocated from that pool.COMMAND_POOL_CREATE_PROTECTED_BITspecifies that command buffers allocated from the pool are protected command buffers.
See Also
Constructors
| CommandPoolCreateFlagBits Flags |
Bundled Patterns
Instances
newtype CommandPoolResetFlagBits Source #
VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool reset
Description
COMMAND_POOL_RESET_RELEASE_RESOURCES_BITspecifies that resetting a command pool recycles all of the resources from the command pool back to the system.
See Also
Constructors
| CommandPoolResetFlagBits Flags |
Bundled Patterns
| pattern COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT :: CommandPoolResetFlagBits |