vulkan-3.3.1: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Core10.CommandPool

Synopsis

Documentation

createCommandPool Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that creates the command pool.

-> CommandPoolCreateInfo

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

-> ("allocator" ::: Maybe AllocationCallbacks)

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

-> 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

Return Codes

Success
Failure

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 Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that destroys the command pool.

-> CommandPool

commandPool is the handle of the command pool to destroy.

-> ("allocator" ::: Maybe AllocationCallbacks)

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

-> 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

AllocationCallbacks, CommandPool, Device

resetCommandPool Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the logical device that owns the command pool.

-> CommandPool

commandPool is the command pool to reset.

-> CommandPoolResetFlags

flags is a bitmask of CommandPoolResetFlagBits controlling the reset operation.

-> 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

CommandPool, CommandPoolResetFlags, Device

data CommandPoolCreateInfo Source #

VkCommandPoolCreateInfo - Structure specifying parameters of a newly created command pool

Valid Usage

Valid Usage (Implicit)

See Also

CommandPoolCreateFlags, StructureType, createCommandPool

Constructors

CommandPoolCreateInfo 

Fields

Instances

Instances details
Eq CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

Show CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

Generic CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

Associated Types

type Rep CommandPoolCreateInfo :: Type -> Type #

Storable CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

FromCStruct CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

ToCStruct CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

Zero CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

type Rep CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

type Rep CommandPoolCreateInfo = D1 ('MetaData "CommandPoolCreateInfo" "Vulkan.Core10.CommandPool" "vulkan-3.3.1-inplace" 'False) (C1 ('MetaCons "CommandPoolCreateInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "flags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CommandPoolCreateFlags) :*: S1 ('MetaSel ('Just "queueFamilyIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word32)))