vulkan
Safe HaskellNone
LanguageHaskell2010

Vulkan.Core10.CommandPool

Synopsis

Documentation

createCommandPool Source #

Arguments

:: forall (a :: [Type]) io. (Extendss CommandPoolCreateInfo a, PokeChain a, MonadIO io) 
=> Device

device is the logical device that creates the command pool.

-> CommandPoolCreateInfo a

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
  • pCreateInfo must be a valid pointer to a valid CommandPoolCreateInfo structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure
  • pCommandPool must be a valid pointer to a CommandPool handle
  • The device must have been created with at least 1 queue

Return Codes

Success
Failure

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.

destroyCommandPool Source #

Arguments

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

VK_VERSION_1_0, AllocationCallbacks, CommandPool, Device

resetCommandPool Source #

Arguments

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

VK_VERSION_1_0, CommandPool, CommandPoolResetFlags, Device

data CommandPoolCreateInfo (es :: [Type]) Source #

VkCommandPoolCreateInfo - Structure specifying parameters of a newly created command pool

Valid Usage

Valid Usage (Implicit)

See Also

VK_VERSION_1_0, CommandPoolCreateFlags, StructureType, createCommandPool

Constructors

CommandPoolCreateInfo 

Fields

Instances

Instances details
Extensible CommandPoolCreateInfo Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

Methods

extensibleTypeName :: String Source #

getNext :: forall (es :: [Type]). CommandPoolCreateInfo es -> Chain es Source #

setNext :: forall (ds :: [Type]) (es :: [Type]). CommandPoolCreateInfo ds -> Chain es -> CommandPoolCreateInfo es Source #

extends :: forall e b proxy. Typeable e => proxy e -> (Extends CommandPoolCreateInfo e => b) -> Maybe b Source #

Show (Chain es) => Show (CommandPoolCreateInfo es) Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

(Extendss CommandPoolCreateInfo es, PeekChain es) => FromCStruct (CommandPoolCreateInfo es) Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

(Extendss CommandPoolCreateInfo es, PokeChain es) => ToCStruct (CommandPoolCreateInfo es) Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

es ~ ('[] :: [Type]) => Zero (CommandPoolCreateInfo es) Source # 
Instance details

Defined in Vulkan.Core10.CommandPool

newtype CommandPool Source #

Constructors

CommandPool Word64 

Instances

Instances details
Eq CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

Ord CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

Storable CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

Show CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

HasObjectType CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

IsHandle CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

Zero CommandPool Source # 
Instance details

Defined in Vulkan.Core10.Handles

newtype CommandPoolCreateFlagBits Source #

VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command pool

Description

  • COMMAND_POOL_CREATE_TRANSIENT_BIT specifies 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.

See Also

VK_VERSION_1_0, CommandPoolCreateFlags

Instances

Instances details
Bits CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Methods

(.&.) :: CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits #

(.|.) :: CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits #

xor :: CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits #

complement :: CommandPoolCreateFlagBits -> CommandPoolCreateFlagBits #

shift :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

rotate :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

zeroBits :: CommandPoolCreateFlagBits #

bit :: Int -> CommandPoolCreateFlagBits #

setBit :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

clearBit :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

complementBit :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

testBit :: CommandPoolCreateFlagBits -> Int -> Bool #

bitSizeMaybe :: CommandPoolCreateFlagBits -> Maybe Int #

bitSize :: CommandPoolCreateFlagBits -> Int #

isSigned :: CommandPoolCreateFlagBits -> Bool #

shiftL :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

unsafeShiftL :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

shiftR :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

unsafeShiftR :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

rotateL :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

rotateR :: CommandPoolCreateFlagBits -> Int -> CommandPoolCreateFlagBits #

popCount :: CommandPoolCreateFlagBits -> Int #

FiniteBits CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Eq CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Ord CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Storable CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Read CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Show CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

Zero CommandPoolCreateFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolCreateFlagBits

newtype CommandPoolResetFlagBits Source #

VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool reset

Description

See Also

VK_VERSION_1_0, CommandPoolResetFlags

Instances

Instances details
Bits CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

FiniteBits CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

Eq CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

Ord CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

Storable CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

Read CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

Show CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits

Zero CommandPoolResetFlagBits Source # 
Instance details

Defined in Vulkan.Core10.Enums.CommandPoolResetFlagBits