vulkan-3.0.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.CommandPool

Synopsis

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 a CommandPoolCreateInfo 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 a CommandPool handle in which the created pool is returned.

Valid Usage

  • pCreateInfo->queueFamilyIndex must be the index of a queue family available in the logical device Device.

Valid Usage (Implicit)

Return Codes

Success
Failure

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

Valid Usage (Implicit)

Host Synchronization

  • Host access to CommandPool must be externally synchronized

See Also

AllocationCallbacks, CommandPool, Device

resetCommandPool :: Device -> CommandPool -> CommandPoolResetFlags -> IO () Source #

vkResetCommandPool - Reset a command pool

Parameters

  • Device is the logical device that owns the 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)

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
Show CommandPoolCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.CommandPool

Storable CommandPoolCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.CommandPool

FromCStruct CommandPoolCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.CommandPool

ToCStruct CommandPoolCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.CommandPool

Zero CommandPoolCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.CommandPool