Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 {}
- newtype CommandPool = CommandPool Word64
- newtype CommandPoolCreateFlagBits where
- type CommandPoolCreateFlags = CommandPoolCreateFlagBits
- newtype CommandPoolResetFlagBits where
- type CommandPoolResetFlags = CommandPoolResetFlagBits
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> CommandPoolCreateInfo |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> 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 devicedevice
Valid Usage (Implicit)
device
must be a validDevice
handle
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 :: 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.
:: forall io. 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
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)
device
must be a validDevice
handle
- 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
:: forall io. 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
CommandBuffer
objects allocated fromcommandPool
must not be in the pending state
Valid Usage (Implicit)
device
must be a validDevice
handle
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 | |
|
Instances
newtype CommandPool Source #
VkCommandPool - Opaque handle to a command pool object
See Also
CommandBufferAllocateInfo
,
createCommandPool
,
destroyCommandPool
,
freeCommandBuffers
,
resetCommandPool
,
trimCommandPool
,
trimCommandPoolKHR
Instances
newtype CommandPoolCreateFlagBits Source #
VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command pool
See Also
pattern COMMAND_POOL_CREATE_TRANSIENT_BIT :: CommandPoolCreateFlagBits |
|
pattern COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT :: CommandPoolCreateFlagBits |
|
pattern COMMAND_POOL_CREATE_PROTECTED_BIT :: CommandPoolCreateFlagBits |
|
Instances
newtype CommandPoolResetFlagBits Source #
VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool reset
See Also
pattern COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT :: CommandPoolResetFlagBits |
|