vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.CommandBuffer

Synopsis

Documentation

newtype VkCommandBufferLevel Source #

VkCommandBufferLevel - Enumerant specifying a command buffer level

See Also

VkCommandBufferAllocateInfo

Instances
Eq VkCommandBufferLevel Source # 
Instance details
Ord VkCommandBufferLevel Source # 
Instance details
Read VkCommandBufferLevel Source # 
Instance details
Show VkCommandBufferLevel Source # 
Instance details
Storable VkCommandBufferLevel Source # 
Instance details

pattern VK_COMMAND_BUFFER_LEVEL_PRIMARY :: VkCommandBufferLevel Source #

VK_COMMAND_BUFFER_LEVEL_PRIMARY specifies a primary command buffer.

pattern VK_COMMAND_BUFFER_LEVEL_SECONDARY :: VkCommandBufferLevel Source #

VK_COMMAND_BUFFER_LEVEL_SECONDARY specifies a secondary command buffer.

newtype VkQueryControlFlagBits Source #

VkQueryControlFlagBits - Bitmask specifying constraints on a query

See Also

VkQueryControlFlags

Instances
Eq VkQueryControlFlagBits Source # 
Instance details
Ord VkQueryControlFlagBits Source # 
Instance details
Read VkQueryControlFlagBits Source # 
Instance details
Show VkQueryControlFlagBits Source # 
Instance details
Storable VkQueryControlFlagBits Source # 
Instance details
Bits VkQueryControlFlagBits Source # 
Instance details
FiniteBits VkQueryControlFlagBits Source # 
Instance details

pattern VK_QUERY_CONTROL_PRECISE_BIT :: VkQueryControlFlagBits Source #

VK_QUERY_CONTROL_PRECISE_BIT specifies the precision of occlusion queries.

newtype VkCommandBufferResetFlagBits Source #

VkCommandBufferResetFlagBits - Bitmask controlling behavior of a command buffer reset

See Also

VkCommandBufferResetFlags

Instances
Eq VkCommandBufferResetFlagBits Source # 
Instance details
Ord VkCommandBufferResetFlagBits Source # 
Instance details
Read VkCommandBufferResetFlagBits Source # 
Instance details
Show VkCommandBufferResetFlagBits Source # 
Instance details
Storable VkCommandBufferResetFlagBits Source # 
Instance details
Bits VkCommandBufferResetFlagBits Source # 
Instance details

Methods

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

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

xor :: VkCommandBufferResetFlagBits -> VkCommandBufferResetFlagBits -> VkCommandBufferResetFlagBits #

complement :: VkCommandBufferResetFlagBits -> VkCommandBufferResetFlagBits #

shift :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

rotate :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

zeroBits :: VkCommandBufferResetFlagBits #

bit :: Int -> VkCommandBufferResetFlagBits #

setBit :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

clearBit :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

complementBit :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

testBit :: VkCommandBufferResetFlagBits -> Int -> Bool #

bitSizeMaybe :: VkCommandBufferResetFlagBits -> Maybe Int #

bitSize :: VkCommandBufferResetFlagBits -> Int #

isSigned :: VkCommandBufferResetFlagBits -> Bool #

shiftL :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

unsafeShiftL :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

shiftR :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

unsafeShiftR :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

rotateL :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

rotateR :: VkCommandBufferResetFlagBits -> Int -> VkCommandBufferResetFlagBits #

popCount :: VkCommandBufferResetFlagBits -> Int #

FiniteBits VkCommandBufferResetFlagBits Source # 
Instance details

pattern VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT :: VkCommandBufferResetFlagBits Source #

VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT specifies that most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands. commandBuffer is moved to the initial state.

newtype VkCommandBufferUsageFlagBits Source #

VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command buffer

See Also

VkCommandBufferUsageFlags

Instances
Eq VkCommandBufferUsageFlagBits Source # 
Instance details
Ord VkCommandBufferUsageFlagBits Source # 
Instance details
Read VkCommandBufferUsageFlagBits Source # 
Instance details
Show VkCommandBufferUsageFlagBits Source # 
Instance details
Storable VkCommandBufferUsageFlagBits Source # 
Instance details
Bits VkCommandBufferUsageFlagBits Source # 
Instance details

Methods

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

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

xor :: VkCommandBufferUsageFlagBits -> VkCommandBufferUsageFlagBits -> VkCommandBufferUsageFlagBits #

complement :: VkCommandBufferUsageFlagBits -> VkCommandBufferUsageFlagBits #

shift :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

rotate :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

zeroBits :: VkCommandBufferUsageFlagBits #

bit :: Int -> VkCommandBufferUsageFlagBits #

setBit :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

clearBit :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

complementBit :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

testBit :: VkCommandBufferUsageFlagBits -> Int -> Bool #

bitSizeMaybe :: VkCommandBufferUsageFlagBits -> Maybe Int #

bitSize :: VkCommandBufferUsageFlagBits -> Int #

isSigned :: VkCommandBufferUsageFlagBits -> Bool #

shiftL :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

unsafeShiftL :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

shiftR :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

unsafeShiftR :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

rotateL :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

rotateR :: VkCommandBufferUsageFlagBits -> Int -> VkCommandBufferUsageFlagBits #

popCount :: VkCommandBufferUsageFlagBits -> Int #

FiniteBits VkCommandBufferUsageFlagBits Source # 
Instance details

pattern VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT :: VkCommandBufferUsageFlagBits Source #

VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT specifies that each recording of the command buffer will only be submitted once, and the command buffer will be reset and recorded again between each submission.

pattern VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT :: VkCommandBufferUsageFlagBits Source #

VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT specifies that a secondary command buffer is considered to be entirely inside a render pass. If this is a primary command buffer, then this bit is ignored.

pattern VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT :: VkCommandBufferUsageFlagBits Source #

VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT specifies that a command buffer can be resubmitted to a queue while it is in the /pending state/, and recorded into multiple primary command buffers.

vkAllocateCommandBuffers :: ("device" ::: VkDevice) -> ("pAllocateInfo" ::: Ptr VkCommandBufferAllocateInfo) -> ("pCommandBuffers" ::: Ptr VkCommandBuffer) -> IO VkResult Source #

vkAllocateCommandBuffers - Allocate command buffers from an existing command pool

Parameters

  • device is the logical device that owns the command pool.
  • pAllocateInfo is a pointer to an instance of the VkCommandBufferAllocateInfo structure describing parameters of the allocation.
  • pCommandBuffers is a pointer to an array of VkCommandBuffer handles in which the resulting command buffer objects are returned. The array must be at least the length specified by the commandBufferCount member of pAllocateInfo. Each allocated command buffer begins in the initial state.

Description

vkAllocateCommandBuffers can be used to create multiple command buffers. If the creation of any of those command buffers fails, the implementation must destroy all successfully created command buffer objects from this command, set all entries of the pCommandBuffers array to NULL and return the error.

When command buffers are first allocated, they are in the initial state.

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • pAllocateInfo must be a valid pointer to a valid VkCommandBufferAllocateInfo structure
  • pCommandBuffers must be a valid pointer to an array of pAllocateInfo::commandBufferCount VkCommandBuffer handles

Host Synchronization

  • Host access to pAllocateInfo::commandPool must be externally synchronized

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkCommandBuffer, VkCommandBufferAllocateInfo, VkDevice

vkFreeCommandBuffers :: ("device" ::: VkDevice) -> ("commandPool" ::: VkCommandPool) -> ("commandBufferCount" ::: Word32) -> ("pCommandBuffers" ::: Ptr VkCommandBuffer) -> IO () Source #

vkFreeCommandBuffers - Free command buffers

Parameters

  • device is the logical device that owns the command pool.
  • commandPool is the command pool from which the command buffers were allocated.
  • commandBufferCount is the length of the pCommandBuffers array.
  • pCommandBuffers is an array of handles of command buffers to free.

Description

Any primary command buffer that is in the recording or executable state and has any element of pCommandBuffers recorded into it, becomes invalid.

Valid Usage

  • pCommandBuffers must be a valid pointer to an array of commandBufferCount VkCommandBuffer handles, each element of which must either be a valid handle or NULL

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • commandPool must be a valid VkCommandPool handle
  • commandBufferCount must be greater than 0
  • commandPool must have been created, allocated, or retrieved from device
  • Each element of pCommandBuffers that is a valid handle must have been created, allocated, or retrieved from commandPool

Host Synchronization

  • Host access to commandPool must be externally synchronized
  • Host access to each member of pCommandBuffers must be externally synchronized

See Also

VkCommandBuffer, VkCommandPool, VkDevice

vkBeginCommandBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("pBeginInfo" ::: Ptr VkCommandBufferBeginInfo) -> IO VkResult Source #

vkBeginCommandBuffer - Start recording a command buffer

Parameters

  • commandBuffer is the handle of the command buffer which is to be put in the recording state.
  • pBeginInfo is an instance of the VkCommandBufferBeginInfo structure, which defines additional information about how the command buffer begins recording.

Valid Usage

  • If commandBuffer was allocated from a VkCommandPool which did not have the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT flag set, commandBuffer must be in the initial state.
  • If commandBuffer is a secondary command buffer, the pInheritanceInfo member of pBeginInfo must be a valid VkCommandBufferInheritanceInfo structure
  • If commandBuffer is a secondary command buffer and either the occlusionQueryEnable member of the pInheritanceInfo member of pBeginInfo is VK_FALSE, or the precise occlusion queries feature is not enabled, the queryFlags member of the pInheritanceInfo member pBeginInfo must not contain VK_QUERY_CONTROL_PRECISE_BIT

Valid Usage (Implicit)

  • commandBuffer must be a valid VkCommandBuffer handle
  • pBeginInfo must be a valid pointer to a valid VkCommandBufferBeginInfo structure

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkCommandBuffer, VkCommandBufferBeginInfo

vkEndCommandBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> IO VkResult Source #

vkEndCommandBuffer - Finish recording a command buffer

Parameters

  • commandBuffer is the command buffer to complete recording.

Description

If there was an error during recording, the application will be notified by an unsuccessful return code returned by vkEndCommandBuffer. If the application wishes to further use the command buffer, the command buffer must be reset. The command buffer must have been in the recording state, and is moved to the executable state.

Valid Usage

  • If commandBuffer is a primary command buffer, there must not be an active render pass instance
  • All queries made active during the recording of commandBuffer must have been made inactive
  • If commandBuffer is a secondary command buffer, there must not be an outstanding vkCmdBeginDebugUtilsLabelEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdEndDebugUtilsLabelEXT.
  • If commandBuffer is a secondary command buffer, there must not be an outstanding vkCmdDebugMarkerBeginEXT command recorded to commandBuffer that has not previously been ended by a call to vkCmdDebugMarkerEndEXT.

Valid Usage (Implicit)

  • commandBuffer must be a valid VkCommandBuffer handle

Host Synchronization

  • Host access to commandBuffer must be externally synchronized
  • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkCommandBuffer

vkResetCommandBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("flags" ::: VkCommandBufferResetFlags) -> IO VkResult Source #

vkResetCommandBuffer - Reset a command buffer to the initial state

Parameters

  • commandBuffer is the command buffer to reset. The command buffer can be in any state other than pending, and is moved into the initial state.

Description

Any primary command buffer that is in the recording or executable state and has commandBuffer recorded into it, becomes invalid.

Valid Usage

  • commandBuffer must have been allocated from a pool that was created with the VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT

Valid Usage (Implicit)

  • commandBuffer must be a valid VkCommandBuffer handle

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkCommandBuffer, VkCommandBufferResetFlags

data VkCommandBufferAllocateInfo Source #

VkCommandBufferAllocateInfo - Structure specifying the allocation parameters for command buffer object

Valid Usage

  • commandBufferCount must be greater than 0

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
  • pNext must be NULL
  • commandPool must be a valid VkCommandPool handle
  • level must be a valid VkCommandBufferLevel value

See Also

VkCommandBufferLevel, VkCommandPool, VkStructureType, vkAllocateCommandBuffers

Constructors

VkCommandBufferAllocateInfo 

Fields

data VkCommandBufferInheritanceInfo Source #

VkCommandBufferInheritanceInfo - Structure specifying command buffer inheritance info

Members

  • sType is the type of this structure.
  • pNext is NULL or a pointer to an extension-specific structure.
  • renderPass is a VkRenderPass object defining which render passes the VkCommandBuffer will be compatible with and can be executed within. If the VkCommandBuffer will not be executed within a render pass instance, renderPass is ignored.
  • subpass is the index of the subpass within the render pass instance that the VkCommandBuffer will be executed within. If the VkCommandBuffer will not be executed within a render pass instance, subpass is ignored.
  • framebuffer optionally refers to the VkFramebuffer object that the VkCommandBuffer will be rendering to if it is executed within a render pass instance. It can be VK_NULL_HANDLE if the framebuffer is not known, or if the VkCommandBuffer will not be executed within a render pass instance.

    Note

    Specifying the exact framebuffer that the secondary command buffer will be executed with may result in better performance at command buffer execution time.

  • occlusionQueryEnable specifies whether the command buffer can be executed while an occlusion query is active in the primary command buffer. If this is VK_TRUE, then this command buffer can be executed whether the primary command buffer has an occlusion query active or not. If this is VK_FALSE, then the primary command buffer must not have an occlusion query active.
  • queryFlags specifies the query flags that can be used by an active occlusion query in the primary command buffer when this secondary command buffer is executed. If this value includes the VK_QUERY_CONTROL_PRECISE_BIT bit, then the active query can return boolean results or actual sample counts. If this bit is not set, then the active query must not use the VK_QUERY_CONTROL_PRECISE_BIT bit.
  • pipelineStatistics is a bitmask of VkQueryPipelineStatisticFlagBits specifying the set of pipeline statistics that can be counted by an active query in the primary command buffer when this secondary command buffer is executed. If this value includes a given bit, then this command buffer can be executed whether the primary command buffer has a pipeline statistics query active that includes this bit or not. If this value excludes a given bit, then the active pipeline statistics query must not be from a query pool that counts that statistic.

Valid Usage

  • If the inherited queries feature is not enabled, occlusionQueryEnable must be VK_FALSE

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
  • pNext must be NULL
  • Both of framebuffer, and renderPass that are valid handles must have been created, allocated, or retrieved from the same VkDevice

See Also

VkBool32, VkCommandBufferBeginInfo, VkFramebuffer, VkQueryControlFlags, VkQueryPipelineStatisticFlags, VkRenderPass, VkStructureType

data VkCommandBufferBeginInfo Source #

VkCommandBufferBeginInfo - Structure specifying a command buffer begin operation

Valid Usage

  • If flags contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the renderPass member of pInheritanceInfo must be a valid VkRenderPass
  • If flags contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the subpass member of pInheritanceInfo must be a valid subpass index within the renderPass member of pInheritanceInfo
  • If flags contains VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, the framebuffer member of pInheritanceInfo must be either VK_NULL_HANDLE, or a valid VkFramebuffer that is compatible with the renderPass member of pInheritanceInfo

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO

See Also

VkCommandBufferInheritanceInfo, VkCommandBufferUsageFlags, VkStructureType, vkBeginCommandBuffer

Constructors

VkCommandBufferBeginInfo 

Fields

type VkQueryControlFlags = VkQueryControlFlagBits Source #

VkQueryControlFlags - Bitmask of VkQueryControlFlagBits

Description

VkQueryControlFlags is a bitmask type for setting a mask of zero or more VkQueryControlFlagBits.

See Also

VkCommandBufferInheritanceInfo, VkQueryControlFlagBits, vkCmdBeginQuery

type VkCommandBufferResetFlags = VkCommandBufferResetFlagBits Source #

VkCommandBufferResetFlags - Bitmask of VkCommandBufferResetFlagBits

Description

VkCommandBufferResetFlags is a bitmask type for setting a mask of zero or more VkCommandBufferResetFlagBits.

See Also

VkCommandBufferResetFlagBits, vkResetCommandBuffer

type VkCommandBufferUsageFlags = VkCommandBufferUsageFlagBits Source #

VkCommandBufferUsageFlags - Bitmask of VkCommandBufferUsageFlagBits

Description

VkCommandBufferUsageFlags is a bitmask type for setting a mask of zero or more VkCommandBufferUsageFlagBits.

See Also

VkCommandBufferBeginInfo, VkCommandBufferUsageFlagBits