| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.CommandBufferBuilding
Synopsis
- newtype VkIndexType = VkIndexType Int32
- pattern VK_INDEX_TYPE_UINT16 :: VkIndexType
- pattern VK_INDEX_TYPE_UINT32 :: VkIndexType
- newtype VkSubpassContents = VkSubpassContents Int32
- pattern VK_SUBPASS_CONTENTS_INLINE :: VkSubpassContents
- pattern VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS :: VkSubpassContents
- newtype VkStencilFaceFlagBits = VkStencilFaceFlagBits VkFlags
- pattern VK_STENCIL_FACE_FRONT_BIT :: VkStencilFaceFlagBits
- pattern VK_STENCIL_FACE_BACK_BIT :: VkStencilFaceFlagBits
- pattern VK_STENCIL_FRONT_AND_BACK :: VkStencilFaceFlagBits
- vkCmdBindPipeline :: ("commandBuffer" ::: VkCommandBuffer) -> ("pipelineBindPoint" ::: VkPipelineBindPoint) -> ("pipeline" ::: VkPipeline) -> IO ()
- vkCmdSetViewport :: ("commandBuffer" ::: VkCommandBuffer) -> ("firstViewport" ::: Word32) -> ("viewportCount" ::: Word32) -> ("pViewports" ::: Ptr VkViewport) -> IO ()
- vkCmdSetScissor :: ("commandBuffer" ::: VkCommandBuffer) -> ("firstScissor" ::: Word32) -> ("scissorCount" ::: Word32) -> ("pScissors" ::: Ptr VkRect2D) -> IO ()
- vkCmdSetLineWidth :: ("commandBuffer" ::: VkCommandBuffer) -> ("lineWidth" ::: CFloat) -> IO ()
- vkCmdSetDepthBias :: ("commandBuffer" ::: VkCommandBuffer) -> ("depthBiasConstantFactor" ::: CFloat) -> ("depthBiasClamp" ::: CFloat) -> ("depthBiasSlopeFactor" ::: CFloat) -> IO ()
- vkCmdSetBlendConstants :: ("commandBuffer" ::: VkCommandBuffer) -> ("blendConstants" ::: Ptr CFloat) -> IO ()
- vkCmdSetDepthBounds :: ("commandBuffer" ::: VkCommandBuffer) -> ("minDepthBounds" ::: CFloat) -> ("maxDepthBounds" ::: CFloat) -> IO ()
- vkCmdSetStencilCompareMask :: ("commandBuffer" ::: VkCommandBuffer) -> ("faceMask" ::: VkStencilFaceFlags) -> ("compareMask" ::: Word32) -> IO ()
- vkCmdSetStencilWriteMask :: ("commandBuffer" ::: VkCommandBuffer) -> ("faceMask" ::: VkStencilFaceFlags) -> ("writeMask" ::: Word32) -> IO ()
- vkCmdSetStencilReference :: ("commandBuffer" ::: VkCommandBuffer) -> ("faceMask" ::: VkStencilFaceFlags) -> ("reference" ::: Word32) -> IO ()
- vkCmdBindDescriptorSets :: ("commandBuffer" ::: VkCommandBuffer) -> ("pipelineBindPoint" ::: VkPipelineBindPoint) -> ("layout" ::: VkPipelineLayout) -> ("firstSet" ::: Word32) -> ("descriptorSetCount" ::: Word32) -> ("pDescriptorSets" ::: Ptr VkDescriptorSet) -> ("dynamicOffsetCount" ::: Word32) -> ("pDynamicOffsets" ::: Ptr Word32) -> IO ()
- vkCmdBindIndexBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> ("indexType" ::: VkIndexType) -> IO ()
- vkCmdBindVertexBuffers :: ("commandBuffer" ::: VkCommandBuffer) -> ("firstBinding" ::: Word32) -> ("bindingCount" ::: Word32) -> ("pBuffers" ::: Ptr VkBuffer) -> ("pOffsets" ::: Ptr VkDeviceSize) -> IO ()
- vkCmdDraw :: ("commandBuffer" ::: VkCommandBuffer) -> ("vertexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstVertex" ::: Word32) -> ("firstInstance" ::: Word32) -> IO ()
- vkCmdDrawIndexed :: ("commandBuffer" ::: VkCommandBuffer) -> ("indexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstIndex" ::: Word32) -> ("vertexOffset" ::: Int32) -> ("firstInstance" ::: Word32) -> IO ()
- vkCmdDrawIndirect :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
- vkCmdDrawIndexedIndirect :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO ()
- vkCmdDispatch :: ("commandBuffer" ::: VkCommandBuffer) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO ()
- vkCmdDispatchIndirect :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> IO ()
- vkCmdCopyBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcBuffer" ::: VkBuffer) -> ("dstBuffer" ::: VkBuffer) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkBufferCopy) -> IO ()
- vkCmdCopyImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkImageCopy) -> IO ()
- vkCmdBlitImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkImageBlit) -> ("filter" ::: VkFilter) -> IO ()
- vkCmdCopyBufferToImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcBuffer" ::: VkBuffer) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkBufferImageCopy) -> IO ()
- vkCmdCopyImageToBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstBuffer" ::: VkBuffer) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkBufferImageCopy) -> IO ()
- vkCmdUpdateBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("dstBuffer" ::: VkBuffer) -> ("dstOffset" ::: VkDeviceSize) -> ("dataSize" ::: VkDeviceSize) -> ("pData" ::: Ptr ()) -> IO ()
- vkCmdFillBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("dstBuffer" ::: VkBuffer) -> ("dstOffset" ::: VkDeviceSize) -> ("size" ::: VkDeviceSize) -> ("data" ::: Word32) -> IO ()
- vkCmdClearColorImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("image" ::: VkImage) -> ("imageLayout" ::: VkImageLayout) -> ("pColor" ::: Ptr VkClearColorValue) -> ("rangeCount" ::: Word32) -> ("pRanges" ::: Ptr VkImageSubresourceRange) -> IO ()
- vkCmdClearDepthStencilImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("image" ::: VkImage) -> ("imageLayout" ::: VkImageLayout) -> ("pDepthStencil" ::: Ptr VkClearDepthStencilValue) -> ("rangeCount" ::: Word32) -> ("pRanges" ::: Ptr VkImageSubresourceRange) -> IO ()
- vkCmdClearAttachments :: ("commandBuffer" ::: VkCommandBuffer) -> ("attachmentCount" ::: Word32) -> ("pAttachments" ::: Ptr VkClearAttachment) -> ("rectCount" ::: Word32) -> ("pRects" ::: Ptr VkClearRect) -> IO ()
- vkCmdResolveImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkImageResolve) -> IO ()
- vkCmdSetEvent :: ("commandBuffer" ::: VkCommandBuffer) -> ("event" ::: VkEvent) -> ("stageMask" ::: VkPipelineStageFlags) -> IO ()
- vkCmdResetEvent :: ("commandBuffer" ::: VkCommandBuffer) -> ("event" ::: VkEvent) -> ("stageMask" ::: VkPipelineStageFlags) -> IO ()
- vkCmdWaitEvents :: ("commandBuffer" ::: VkCommandBuffer) -> ("eventCount" ::: Word32) -> ("pEvents" ::: Ptr VkEvent) -> ("srcStageMask" ::: VkPipelineStageFlags) -> ("dstStageMask" ::: VkPipelineStageFlags) -> ("memoryBarrierCount" ::: Word32) -> ("pMemoryBarriers" ::: Ptr VkMemoryBarrier) -> ("bufferMemoryBarrierCount" ::: Word32) -> ("pBufferMemoryBarriers" ::: Ptr VkBufferMemoryBarrier) -> ("imageMemoryBarrierCount" ::: Word32) -> ("pImageMemoryBarriers" ::: Ptr VkImageMemoryBarrier) -> IO ()
- vkCmdPipelineBarrier :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcStageMask" ::: VkPipelineStageFlags) -> ("dstStageMask" ::: VkPipelineStageFlags) -> ("dependencyFlags" ::: VkDependencyFlags) -> ("memoryBarrierCount" ::: Word32) -> ("pMemoryBarriers" ::: Ptr VkMemoryBarrier) -> ("bufferMemoryBarrierCount" ::: Word32) -> ("pBufferMemoryBarriers" ::: Ptr VkBufferMemoryBarrier) -> ("imageMemoryBarrierCount" ::: Word32) -> ("pImageMemoryBarriers" ::: Ptr VkImageMemoryBarrier) -> IO ()
- vkCmdBeginQuery :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("query" ::: Word32) -> ("flags" ::: VkQueryControlFlags) -> IO ()
- vkCmdEndQuery :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("query" ::: Word32) -> IO ()
- vkCmdResetQueryPool :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO ()
- vkCmdWriteTimestamp :: ("commandBuffer" ::: VkCommandBuffer) -> ("pipelineStage" ::: VkPipelineStageFlagBits) -> ("queryPool" ::: VkQueryPool) -> ("query" ::: Word32) -> IO ()
- vkCmdCopyQueryPoolResults :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dstBuffer" ::: VkBuffer) -> ("dstOffset" ::: VkDeviceSize) -> ("stride" ::: VkDeviceSize) -> ("flags" ::: VkQueryResultFlags) -> IO ()
- vkCmdPushConstants :: ("commandBuffer" ::: VkCommandBuffer) -> ("layout" ::: VkPipelineLayout) -> ("stageFlags" ::: VkShaderStageFlags) -> ("offset" ::: Word32) -> ("size" ::: Word32) -> ("pValues" ::: Ptr ()) -> IO ()
- vkCmdBeginRenderPass :: ("commandBuffer" ::: VkCommandBuffer) -> ("pRenderPassBegin" ::: Ptr VkRenderPassBeginInfo) -> ("contents" ::: VkSubpassContents) -> IO ()
- vkCmdNextSubpass :: ("commandBuffer" ::: VkCommandBuffer) -> ("contents" ::: VkSubpassContents) -> IO ()
- vkCmdEndRenderPass :: ("commandBuffer" ::: VkCommandBuffer) -> IO ()
- vkCmdExecuteCommands :: ("commandBuffer" ::: VkCommandBuffer) -> ("commandBufferCount" ::: Word32) -> ("pCommandBuffers" ::: Ptr VkCommandBuffer) -> IO ()
- data VkClearRect = VkClearRect {}
- data VkImageSubresourceLayers = VkImageSubresourceLayers {}
- data VkMemoryBarrier = VkMemoryBarrier {}
- data VkBufferMemoryBarrier = VkBufferMemoryBarrier {}
- data VkImageMemoryBarrier = VkImageMemoryBarrier {}
- data VkBufferCopy = VkBufferCopy {}
- data VkImageCopy = VkImageCopy {}
- data VkImageBlit = VkImageBlit {}
- data VkBufferImageCopy = VkBufferImageCopy {}
- data VkImageResolve = VkImageResolve {}
- data VkRenderPassBeginInfo = VkRenderPassBeginInfo {}
- data VkClearDepthStencilValue = VkClearDepthStencilValue {}
- data VkClearAttachment = VkClearAttachment {}
- data VkDrawIndirectCommand = VkDrawIndirectCommand {}
- data VkDrawIndexedIndirectCommand = VkDrawIndexedIndirectCommand {}
- data VkDispatchIndirectCommand = VkDispatchIndirectCommand {}
- data VkClearColorValue
- data VkClearValue
- type VkStencilFaceFlags = VkStencilFaceFlagBits
Documentation
newtype VkIndexType Source #
VkIndexType - Type of index buffer indices
See Also
Constructors
| VkIndexType Int32 |
Instances
pattern VK_INDEX_TYPE_UINT16 :: VkIndexType Source #
VK_INDEX_TYPE_UINT16 specifies that indices are 16-bit unsigned
integer values.
pattern VK_INDEX_TYPE_UINT32 :: VkIndexType Source #
VK_INDEX_TYPE_UINT32 specifies that indices are 32-bit unsigned
integer values.
newtype VkSubpassContents Source #
VkSubpassContents - Specify how commands in the first subpass of a render pass are provided
See Also
Constructors
| VkSubpassContents Int32 |
Instances
pattern VK_SUBPASS_CONTENTS_INLINE :: VkSubpassContents Source #
VK_SUBPASS_CONTENTS_INLINE specifies that the contents of the subpass
will be recorded inline in the primary command buffer, and secondary
command buffers must not be executed within the subpass.
pattern VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS :: VkSubpassContents Source #
VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS specifies that the
contents are recorded in secondary command buffers that will be called
from the primary command buffer, and vkCmdExecuteCommands is the only
valid command on the command buffer until vkCmdNextSubpass or
vkCmdEndRenderPass.
newtype VkStencilFaceFlagBits Source #
VkStencilFaceFlagBits - Bitmask specifying sets of stencil state for which to update the compare mask
See Also
Constructors
| VkStencilFaceFlagBits VkFlags |
Instances
pattern VK_STENCIL_FACE_FRONT_BIT :: VkStencilFaceFlagBits Source #
VK_STENCIL_FACE_FRONT_BIT specifies that only the front set of stencil
state is updated.
pattern VK_STENCIL_FACE_BACK_BIT :: VkStencilFaceFlagBits Source #
VK_STENCIL_FACE_BACK_BIT specifies that only the back set of stencil
state is updated.
pattern VK_STENCIL_FRONT_AND_BACK :: VkStencilFaceFlagBits Source #
VK_STENCIL_FRONT_AND_BACK is the combination of
VK_STENCIL_FACE_FRONT_BIT and VK_STENCIL_FACE_BACK_BIT, and
specifies that both sets of stencil state are updated.
vkCmdBindPipeline :: ("commandBuffer" ::: VkCommandBuffer) -> ("pipelineBindPoint" ::: VkPipelineBindPoint) -> ("pipeline" ::: VkPipeline) -> IO () Source #
vkCmdBindPipeline - Bind a pipeline object to a command buffer
Parameters
commandBufferis the command buffer that the pipeline will be bound to.
pipelineBindPointis aVkPipelineBindPointvalue specifying whether to bind to the compute or graphics bind point. Binding one does not disturb the other.pipelineis the pipeline to be bound.
Description
Once bound, a pipeline binding affects subsequent graphics or compute
commands in the command buffer until a different pipeline is bound to
the bind point. The pipeline bound to VK_PIPELINE_BIND_POINT_COMPUTE
controls the behavior of vkCmdDispatch and vkCmdDispatchIndirect.
The pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS controls the
behavior of all drawing
commands.
No other commands are affected by the pipeline state.
Valid Usage
- If
pipelineBindPointisVK_PIPELINE_BIND_POINT_COMPUTE, theVkCommandPoolthatcommandBufferwas allocated from must support compute operations
- If
pipelineBindPointisVK_PIPELINE_BIND_POINT_GRAPHICS, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If
pipelineBindPointisVK_PIPELINE_BIND_POINT_COMPUTE,pipelinemust be a compute pipeline - If
pipelineBindPointisVK_PIPELINE_BIND_POINT_GRAPHICS,pipelinemust be a graphics pipeline - If the variable multisample
rate
feature is not supported,
pipelineis a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline - If
VkPhysicalDeviceSampleLocationsPropertiesEXT::variableSampleLocationsisVK_FALSE, andpipelineis a graphics pipeline created with aVkPipelineSampleLocationsStateCreateInfoEXTstructure having itssampleLocationsEnablemember set toVK_TRUEbut withoutVK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXTenabled then the current render pass instance must have been begun by specifying aVkRenderPassSampleLocationsBeginInfoEXTstructure whosepPostSubpassSampleLocationsmember contains an element with asubpassIndexmatching the current subpass index and thesampleLocationsInfomember of that element must match thesampleLocationsInfospecified inVkPipelineSampleLocationsStateCreateInfoEXTwhen the pipeline was created
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pipelineBindPointmust be a validVkPipelineBindPointvaluepipelinemust be a validVkPipelinehandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andpipelinemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
vkCmdSetViewport :: ("commandBuffer" ::: VkCommandBuffer) -> ("firstViewport" ::: Word32) -> ("viewportCount" ::: Word32) -> ("pViewports" ::: Ptr VkViewport) -> IO () Source #
vkCmdSetViewport - Set the viewport on a command buffer
Parameters
commandBufferis the command buffer into which the command will be recorded.
firstViewportis the index of the first viewport whose parameters are updated by the command.viewportCountis the number of viewports whose parameters are updated by the command.pViewportsis a pointer to an array ofVkViewportstructures specifying viewport parameters.
Description
The viewport parameters taken from element i of pViewports replace the
current state for the viewport index firstViewport + i, for i in [0,
viewportCount).
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_VIEWPORTdynamic state enabled
firstViewportmust be less thanVkPhysicalDeviceLimits::maxViewports- The sum of
firstViewportandviewportCountmust be between1andVkPhysicalDeviceLimits::maxViewports, inclusive - If the multiple
viewports
feature is not enabled,
firstViewportmust be0 - If the multiple
viewports
feature is not enabled,
viewportCountmust be1
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pViewportsmust be a valid pointer to an array ofviewportCountVkViewportstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations viewportCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetScissor :: ("commandBuffer" ::: VkCommandBuffer) -> ("firstScissor" ::: Word32) -> ("scissorCount" ::: Word32) -> ("pScissors" ::: Ptr VkRect2D) -> IO () Source #
vkCmdSetScissor - Set the dynamic scissor rectangles on a command buffer
Parameters
commandBufferis the command buffer into which the command will be recorded.
firstScissoris the index of the first scissor whose state is updated by the command.scissorCountis the number of scissors whose rectangles are updated by the command.pScissorsis a pointer to an array ofVkRect2Dstructures defining scissor rectangles.
Description
The scissor rectangles taken from element i of pScissors replace the
current state for the scissor index firstScissor + i, for i in [0,
scissorCount).
Each scissor rectangle is described by a
VkRect2D structure, with the
offset.x and offset.y values determining the upper left corner of
the scissor rectangle, and the extent.width and extent.height values
determining the size in pixels.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_SCISSORdynamic state enabled
firstScissormust be less thanVkPhysicalDeviceLimits::maxViewports- The sum of
firstScissorandscissorCountmust be between1andVkPhysicalDeviceLimits::maxViewports, inclusive - If the multiple
viewports
feature is not enabled,
firstScissormust be0 - If the multiple
viewports
feature is not enabled,
scissorCountmust be1 - The
xandymembers ofoffsetmust be greater than or equal to0 - Evaluation of (
offset.x+extent.width) must not cause a signed integer addition overflow - Evaluation of (
offset.y+extent.height) must not cause a signed integer addition overflow
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pScissorsmust be a valid pointer to an array ofscissorCountVkRect2DstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations scissorCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetLineWidth :: ("commandBuffer" ::: VkCommandBuffer) -> ("lineWidth" ::: CFloat) -> IO () Source #
vkCmdSetLineWidth - Set the dynamic line width state
Parameters
commandBufferis the command buffer into which the command will be recorded.
lineWidthis the width of rasterized line segments.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_LINE_WIDTHdynamic state enabled
- If the wide
lines
feature is not enabled,
lineWidthmust be1.0
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetDepthBias :: ("commandBuffer" ::: VkCommandBuffer) -> ("depthBiasConstantFactor" ::: CFloat) -> ("depthBiasClamp" ::: CFloat) -> ("depthBiasSlopeFactor" ::: CFloat) -> IO () Source #
vkCmdSetDepthBias - Set the depth bias dynamic state
Parameters
commandBufferis the command buffer into which the command will be recorded.
depthBiasConstantFactoris a scalar factor controlling the constant depth value added to each fragment.depthBiasClampis the maximum (or minimum) depth bias of a fragment.depthBiasSlopeFactoris a scalar factor applied to a fragment’s slope in depth bias calculations.
Description
If depthBiasEnable is VK_FALSE, no depth bias is applied and the
fragment’s depth values are unchanged.
depthBiasSlopeFactor scales the maximum depth slope of the polygon,
and depthBiasConstantFactor scales an implementation-dependent
constant that relates to the usable resolution of the depth buffer. The
resulting values are summed to produce the depth bias value which is
then clamped to a minimum or maximum value specified by
depthBiasClamp. depthBiasSlopeFactor, depthBiasConstantFactor, and
depthBiasClamp can each be positive, negative, or zero.
The maximum depth slope m of a triangle is
\[m = \sqrt{ \left({{\partial z_f} \over {\partial x_f}}\right)^2 + \left({{\partial z_f} \over {\partial y_f}}\right)^2}\]
where (xf, yf, zf) is a point on the triangle. m may be approximated as
\[m = \max\left( \left| { {\partial z_f} \over {\partial x_f} } \right|, \left| { {\partial z_f} \over {\partial y_f} } \right| \right).\]
The minimum resolvable difference r is an implementation-dependent
parameter that depends on the depth buffer representation. It is the
smallest difference in framebuffer coordinate z values that is
guaranteed to remain distinct throughout polygon rasterization and in
the depth buffer. All pairs of fragments generated by the rasterization
of two polygons with otherwise identical vertices, but zf values that
differ by $r$, will have distinct depth values.
For fixed-point depth buffer representations, r is constant throughout the range of the entire depth buffer. For floating-point depth buffers, there is no single minimum resolvable difference. In this case, the minimum resolvable difference for a given polygon is dependent on the maximum exponent, e, in the range of z values spanned by the primitive. If n is the number of bits in the floating-point mantissa, the minimum resolvable difference, r, for the given primitive is defined as
- r = 2e-n
If a triangle is rasterized using the
VK_POLYGON_MODE_FILL_RECTANGLE_NV polygon mode, then this minimum
resolvable difference may not be resolvable for samples outside of the
triangle, where the depth is extrapolated.
If no depth buffer is present, r is undefined.
The bias value o for a polygon is
\[o = \begin{cases} m \times depthBiasSlopeFactor + r \times depthBiasConstantFactor & depthBiasClamp = 0\ or\ NaN \\ \min(m \times depthBiasSlopeFactor + r \times depthBiasConstantFactor, depthBiasClamp) & depthBiasClamp > 0 \\ \max(m \times depthBiasSlopeFactor + r \times depthBiasConstantFactor, depthBiasClamp) & depthBiasClamp < 0 \\ \end{cases}\]
m is computed as described above. If the depth buffer uses a fixed-point representation, m is a function of depth values in the range [0,1], and o is applied to depth values in the same range.
For fixed-point depth buffers, fragment depth values are always limited
to the range [0,1] by clamping after depth bias addition is performed.
Unless the {html_spec_relative}#VK_EXT_depth_range_unrestricted
extension is enabled, fragment depth values are clamped even when the
depth buffer uses a floating-point representation.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_DEPTH_BIASdynamic state enabled
- If the depth bias
clamping
feature is not enabled,
depthBiasClampmust be0.0
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetBlendConstants :: ("commandBuffer" ::: VkCommandBuffer) -> ("blendConstants" ::: Ptr CFloat) -> IO () Source #
vkCmdSetBlendConstants - Set the values of blend constants
Parameters
commandBufferis the command buffer into which the command will be recorded.
blendConstantsis an array of four values specifying the R, G, B, and A components of the blend constant color used in blending, depending on the blend factor.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_BLEND_CONSTANTSdynamic state enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetDepthBounds :: ("commandBuffer" ::: VkCommandBuffer) -> ("minDepthBounds" ::: CFloat) -> ("maxDepthBounds" ::: CFloat) -> IO () Source #
vkCmdSetDepthBounds - Set the depth bounds test values for a command buffer
Parameters
commandBufferis the command buffer into which the command will be recorded.
minDepthBoundsis the lower bound of the range of depth values used in the depth bounds test.maxDepthBoundsis the upper bound of the range.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_DEPTH_BOUNDSdynamic state enabled
- Unless the
{html_spec_relative}#VK_EXT_depth_range_unrestrictedextension is enabledminDepthBoundsmust be between0.0and1.0, inclusive - Unless the
{html_spec_relative}#VK_EXT_depth_range_unrestrictedextension is enabledmaxDepthBoundsmust be between0.0and1.0, inclusive
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetStencilCompareMask :: ("commandBuffer" ::: VkCommandBuffer) -> ("faceMask" ::: VkStencilFaceFlags) -> ("compareMask" ::: Word32) -> IO () Source #
vkCmdSetStencilCompareMask - Set the stencil compare mask dynamic state
Parameters
commandBufferis the command buffer into which the command will be recorded.
faceMaskis a bitmask ofVkStencilFaceFlagBitsspecifying the set of stencil state for which to update the compare mask.compareMaskis the new value to use as the stencil compare mask.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_STENCIL_COMPARE_MASKdynamic state enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
faceMaskmust be a valid combination ofVkStencilFaceFlagBitsvaluesfaceMaskmust not be0commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetStencilWriteMask :: ("commandBuffer" ::: VkCommandBuffer) -> ("faceMask" ::: VkStencilFaceFlags) -> ("writeMask" ::: Word32) -> IO () Source #
vkCmdSetStencilWriteMask - Set the stencil write mask dynamic state
Parameters
commandBufferis the command buffer into which the command will be recorded.
faceMaskis a bitmask ofVkStencilFaceFlagBitsspecifying the set of stencil state for which to update the write mask, as described above forvkCmdSetStencilCompareMask.writeMaskis the new value to use as the stencil write mask.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_STENCIL_WRITE_MASKdynamic state enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
faceMaskmust be a valid combination ofVkStencilFaceFlagBitsvaluesfaceMaskmust not be0commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdSetStencilReference :: ("commandBuffer" ::: VkCommandBuffer) -> ("faceMask" ::: VkStencilFaceFlags) -> ("reference" ::: Word32) -> IO () Source #
vkCmdSetStencilReference - Set the stencil reference dynamic state
Parameters
commandBufferis the command buffer into which the command will be recorded.
faceMaskis a bitmask ofVkStencilFaceFlagBitsspecifying the set of stencil state for which to update the reference value, as described above forvkCmdSetStencilCompareMask.referenceis the new value to use as the stencil reference value.
Valid Usage
- The bound graphics pipeline must have been created with the
VK_DYNAMIC_STATE_STENCIL_REFERENCEdynamic state enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
faceMaskmust be a valid combination ofVkStencilFaceFlagBitsvaluesfaceMaskmust not be0commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
vkCmdBindDescriptorSets :: ("commandBuffer" ::: VkCommandBuffer) -> ("pipelineBindPoint" ::: VkPipelineBindPoint) -> ("layout" ::: VkPipelineLayout) -> ("firstSet" ::: Word32) -> ("descriptorSetCount" ::: Word32) -> ("pDescriptorSets" ::: Ptr VkDescriptorSet) -> ("dynamicOffsetCount" ::: Word32) -> ("pDynamicOffsets" ::: Ptr Word32) -> IO () Source #
vkCmdBindDescriptorSets - Binds descriptor sets to a command buffer
Parameters
commandBufferis the command buffer that the descriptor sets will be bound to.
pipelineBindPointis aVkPipelineBindPointindicating whether the descriptors will be used by graphics pipelines or compute pipelines. There is a separate set of bind points for each of graphics and compute, so binding one does not disturb the other.layoutis aVkPipelineLayoutobject used to program the bindings.firstSetis the set number of the first descriptor set to be bound.descriptorSetCountis the number of elements in thepDescriptorSetsarray.pDescriptorSetsis an array of handles toVkDescriptorSetobjects describing the descriptor sets to write to.dynamicOffsetCountis the number of dynamic offsets in thepDynamicOffsetsarray.pDynamicOffsetsis a pointer to an array ofuint32_tvalues specifying dynamic offsets.
Description
vkCmdBindDescriptorSets causes the sets numbered [firstSet..
firstSet+descriptorSetCount-1] to use the bindings stored in
pDescriptorSets[0..descriptorSetCount-1] for subsequent rendering
commands (either compute or graphics, according to the
pipelineBindPoint). Any bindings that were previously applied via
these sets are no longer valid.
Once bound, a descriptor set affects rendering of subsequent graphics or compute commands in the command buffer until a different set is bound to the same set number, or else until the set is disturbed as described in Pipeline Layout Compatibility.
A compatible descriptor set must be bound for all set numbers that any shaders in a pipeline access, at the time that a draw or dispatch command is recorded to execute using that pipeline. However, if none of the shaders in a pipeline statically use any bindings with a particular set number, then no descriptor set need be bound for that set number, even if the pipeline layout includes a non-trivial descriptor set layout for that set number.
If any of the sets being bound include dynamic uniform or storage
buffers, then pDynamicOffsets includes one element for each array
element in each dynamic descriptor type binding in each set. Values are
taken from pDynamicOffsets in an order such that all entries for set N
come before set N+1; within a set, entries are ordered by the binding
numbers in the descriptor set layouts; and within a binding array,
elements are in order. dynamicOffsetCount must equal the total
number of dynamic descriptors in the sets being bound.
The effective offset used for dynamic uniform and storage buffer
bindings is the sum of the relative offset taken from pDynamicOffsets,
and the base address of the buffer plus base offset in the descriptor
set. The length of the dynamic uniform and storage buffer bindings is
the buffer range as specified in the descriptor set.
Each of the pDescriptorSets must be compatible with the pipeline
layout specified by layout. The layout used to program the bindings
must also be compatible with the pipeline used in subsequent graphics
or compute commands, as defined in the Pipeline Layout
Compatibility
section.
The descriptor set contents bound by a call to vkCmdBindDescriptorSets
may be consumed at the following times:
- For descriptor bindings created with the
VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXTbit set, the contents may be consumed when the command buffer is submitted to a queue, or during shader execution of the resulting draws and dispatches, or any time in between. Otherwise, - during host execution of the command, or during shader execution of the resulting draws and dispatches, or any time in between.
Thus, the contents of a descriptor set binding must not be altered (overwritten by an update command, or freed) between the first point in time that it may be consumed, and and when the command completes executing on the queue.
The contents of pDynamicOffsets are consumed immediately during
execution of vkCmdBindDescriptorSets. Once all pending uses have
completed, it is legal to update and reuse a descriptor set.
Valid Usage
- Each element of
pDescriptorSetsmust have been allocated with aVkDescriptorSetLayoutthat matches (is the same as, or identically defined as) theVkDescriptorSetLayoutat set n inlayout, where n is the sum offirstSetand the index intopDescriptorSets
dynamicOffsetCountmust be equal to the total number of dynamic descriptors inpDescriptorSets- The sum of
firstSetanddescriptorSetCountmust be less than or equal toVkPipelineLayoutCreateInfo::setLayoutCountprovided whenlayoutwas created pipelineBindPointmust be supported by thecommandBuffer’s parentVkCommandPool’s queue family- Each element of
pDynamicOffsetsmust satisfy the required alignment for the corresponding descriptor binding’s descriptor type
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pipelineBindPointmust be a validVkPipelineBindPointvaluelayoutmust be a validVkPipelineLayouthandlepDescriptorSetsmust be a valid pointer to an array ofdescriptorSetCountvalidVkDescriptorSethandles- If
dynamicOffsetCountis not0,pDynamicOffsetsmust be a valid pointer to an array ofdynamicOffsetCountuint32_tvalues commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations descriptorSetCountmust be greater than0- Each of
commandBuffer,layout, and the elements ofpDescriptorSetsmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
VkCommandBuffer,
VkDescriptorSet,
VkPipelineBindPoint,
VkPipelineLayout
vkCmdBindIndexBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> ("indexType" ::: VkIndexType) -> IO () Source #
vkCmdBindIndexBuffer - Bind an index buffer to a command buffer
Parameters
commandBufferis the command buffer into which the command is recorded.
bufferis the buffer being bound.offsetis the starting offset in bytes withinbufferused in index buffer address calculations.indexTypeis aVkIndexTypevalue specifying whether indices are treated as 16 bits or 32 bits.
Valid Usage
offsetmust be less than the size ofbuffer
- The sum of
offsetand the address of the range ofVkDeviceMemoryobject that is backingbuffer, must be a multiple of the type indicated byindexType buffermust have been created with theVK_BUFFER_USAGE_INDEX_BUFFER_BITflag- If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
buffermust be a validVkBufferhandleindexTypemust be a validVkIndexTypevaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - Both of
buffer, andcommandBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize,
VkIndexType
vkCmdBindVertexBuffers :: ("commandBuffer" ::: VkCommandBuffer) -> ("firstBinding" ::: Word32) -> ("bindingCount" ::: Word32) -> ("pBuffers" ::: Ptr VkBuffer) -> ("pOffsets" ::: Ptr VkDeviceSize) -> IO () Source #
vkCmdBindVertexBuffers - Bind vertex buffers to a command buffer
Parameters
commandBufferis the command buffer into which the command is recorded.
firstBindingis the index of the first vertex input binding whose state is updated by the command.bindingCountis the number of vertex input bindings whose state is updated by the command.pBuffersis a pointer to an array of buffer handles.pOffsetsis a pointer to an array of buffer offsets.
Description
The values taken from elements i of pBuffers and pOffsets replace
the current state for the vertex input binding firstBinding + i, for i
in [0, bindingCount). The vertex input binding is updated to start at
the offset indicated by pOffsets[i] from the start of the buffer
pBuffers[i]. All vertex input attributes that use each of these
bindings will use these updated addresses in their address calculations
for subsequent draw commands.
Valid Usage
firstBindingmust be less thanVkPhysicalDeviceLimits::maxVertexInputBindings
- The sum of
firstBindingandbindingCountmust be less than or equal toVkPhysicalDeviceLimits::maxVertexInputBindings - All elements of
pOffsetsmust be less than the size of the corresponding element inpBuffers - All elements of
pBuffersmust have been created with theVK_BUFFER_USAGE_VERTEX_BUFFER_BITflag - Each element of
pBuffersthat is non-sparse must be bound completely and contiguously to a singleVkDeviceMemoryobject
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pBuffersmust be a valid pointer to an array ofbindingCountvalidVkBufferhandlespOffsetsmust be a valid pointer to an array ofbindingCountVkDeviceSizevaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations bindingCountmust be greater than0- Both of
commandBuffer, and the elements ofpBuffersmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize
vkCmdDraw :: ("commandBuffer" ::: VkCommandBuffer) -> ("vertexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstVertex" ::: Word32) -> ("firstInstance" ::: Word32) -> IO () Source #
vkCmdDraw - Draw primitives
Parameters
commandBufferis the command buffer into which the command is recorded.
vertexCountis the number of vertices to draw.instanceCountis the number of instances to draw.firstVertexis the index of the first vertex to draw.firstInstanceis the instance ID of the first instance to draw.
Description
When the command is executed, primitives are assembled using the current
primitive topology and vertexCount consecutive vertex indices with the
first vertexIndex value equal to firstVertex. The primitives are
drawn instanceCount times with instanceIndex starting with
firstInstance and increasing sequentially for each instance. The
assembled primitives execute the bound graphics pipeline.
Valid Usage
- The current render pass must be
compatible
with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS.
- The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS. - For each set n that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n atVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - For each push constant that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set forVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets, must be valid if they are statically used by the boundVkPipelineobject, specified viavkCmdBindPipeline - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in {html_spec_relative}#fxvertex-input
- A valid graphics pipeline must be bound to the current command
buffer with
VK_PIPELINE_BIND_POINT_GRAPHICS - If the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSrequires any dynamic state, that state must have been set on the current command buffer - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a uniform buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a storage buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - Any
VkImageViewbeing sampled withVK_FILTER_LINEARas a result of this command must be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must not have aVkImageViewTypeofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY - If the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
See Also
vkCmdDrawIndexed :: ("commandBuffer" ::: VkCommandBuffer) -> ("indexCount" ::: Word32) -> ("instanceCount" ::: Word32) -> ("firstIndex" ::: Word32) -> ("vertexOffset" ::: Int32) -> ("firstInstance" ::: Word32) -> IO () Source #
vkCmdDrawIndexed - Issue an indexed draw into a command buffer
Parameters
commandBufferis the command buffer into which the command is recorded.
indexCountis the number of vertices to draw.instanceCountis the number of instances to draw.firstIndexis the base index within the index buffer.vertexOffsetis the value added to the vertex index before indexing into the vertex buffer.firstInstanceis the instance ID of the first instance to draw.
Description
When the command is executed, primitives are assembled using the current
primitive topology and indexCount vertices whose indices are retrieved
from the index buffer. The index buffer is treated as an array of
tightly packed unsigned integers of size defined by the
vkCmdBindIndexBuffer::indexType parameter with which the buffer was
bound.
The first vertex index is at an offset of firstIndex * indexSize +
offset within the bound index buffer, where offset is the offset
specified by vkCmdBindIndexBuffer and indexSize is the byte size of
the type specified by indexType. Subsequent index values are retrieved
from consecutive locations in the index buffer. Indices are first
compared to the primitive restart value, then zero extended to 32 bits
(if the indexType is VK_INDEX_TYPE_UINT16) and have vertexOffset
added to them, before being supplied as the vertexIndex value.
The primitives are drawn instanceCount times with instanceIndex
starting with firstInstance and increasing sequentially for each
instance. The assembled primitives execute the bound graphics pipeline.
Valid Usage
- The current render pass must be
compatible
with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS.
- The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS. - For each set n that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n atVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - For each push constant that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set forVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets, must be valid if they are statically used by the boundVkPipelineobject, specified viavkCmdBindPipeline - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in {html_spec_relative}#fxvertex-input
- A valid graphics pipeline must be bound to the current command
buffer with
VK_PIPELINE_BIND_POINT_GRAPHICS - If the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSrequires any dynamic state, that state must have been set on the current command buffer - (
indexSize* (firstIndex+indexCount) +offset) must be less than or equal to the size of the bound index buffer, with indexSize being based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viavkCmdBindIndexBuffer - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a uniform buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a storage buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - Any
VkImageViewbeing sampled withVK_FILTER_LINEARas a result of this command must be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must not have aVkImageViewTypeofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY - If the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
See Also
vkCmdDrawIndirect :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO () Source #
vkCmdDrawIndirect - Issue an indirect draw into a command buffer
Parameters
commandBufferis the command buffer into which the command is recorded.
bufferis the buffer containing draw parameters.offsetis the byte offset intobufferwhere parameters begin.drawCountis the number of draws to execute, and can be zero.strideis the byte stride between successive sets of draw parameters.
Description
vkCmdDrawIndirect behaves similarly to vkCmdDraw except that the
parameters are read by the device from a buffer during execution.
drawCount draws are executed by the command, with parameters taken
from buffer starting at offset and increasing by stride bytes for
each successive draw. The parameters of each draw are encoded in an
array of VkDrawIndirectCommand structures. If drawCount is less than
or equal to one, stride is ignored.
Valid Usage
- If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit setoffsetmust be a multiple of4- If
drawCountis greater than1,stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawIndirectCommand) - If the multi-draw
indirect
feature is not enabled,
drawCountmust be0or1 - If the
drawIndirectFirstInstance
feature is not enabled, all the
firstInstancemembers of theVkDrawIndirectCommandstructures accessed by this command must be0 - The current render pass must be
compatible
with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS. - The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS. - For each set n that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n atVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - For each push constant that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set forVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets, must be valid if they are statically used by the boundVkPipelineobject, specified viavkCmdBindPipeline - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- A valid graphics pipeline must be bound to the current command
buffer with
VK_PIPELINE_BIND_POINT_GRAPHICS - If the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSrequires any dynamic state, that state must have been set on the current command buffer - If
drawCountis equal to1, (offset+sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer - If
drawCountis greater than1, (stride× (drawCount- 1) +offset+sizeof(VkDrawIndirectCommand)) must be less than or equal to the size ofbuffer drawCountmust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount- Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a uniform buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a storage buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - Any
VkImageViewbeing sampled withVK_FILTER_LINEARas a result of this command must be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must not have aVkImageViewTypeofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY - If the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
buffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
buffer, andcommandBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize
vkCmdDrawIndexedIndirect :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> ("drawCount" ::: Word32) -> ("stride" ::: Word32) -> IO () Source #
vkCmdDrawIndexedIndirect - Perform an indexed indirect draw
Parameters
commandBufferis the command buffer into which the command is recorded.
bufferis the buffer containing draw parameters.offsetis the byte offset intobufferwhere parameters begin.drawCountis the number of draws to execute, and can be zero.strideis the byte stride between successive sets of draw parameters.
Description
vkCmdDrawIndexedIndirect behaves similarly to vkCmdDrawIndexed
except that the parameters are read by the device from a buffer during
execution. drawCount draws are executed by the command, with
parameters taken from buffer starting at offset and increasing by
stride bytes for each successive draw. The parameters of each draw are
encoded in an array of VkDrawIndexedIndirectCommand structures. If
drawCount is less than or equal to one, stride is ignored.
Valid Usage
- If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit setoffsetmust be a multiple of4- If
drawCountis greater than1,stridemust be a multiple of4and must be greater than or equal tosizeof(VkDrawIndexedIndirectCommand) - If the multi-draw
indirect
feature is not enabled,
drawCountmust be0or1 - If the
drawIndirectFirstInstance
feature is not enabled, all the
firstInstancemembers of theVkDrawIndexedIndirectCommandstructures accessed by this command must be0 - The current render pass must be
compatible
with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS. - The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS. - For each set n that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a descriptor set must have been bound to n atVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - For each push constant that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICS, a push constant value must have been set forVK_PIPELINE_BIND_POINT_GRAPHICS, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets, must be valid if they are statically used by the boundVkPipelineobject, specified viavkCmdBindPipeline - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- A valid graphics pipeline must be bound to the current command
buffer with
VK_PIPELINE_BIND_POINT_GRAPHICS - If the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSrequires any dynamic state, that state must have been set on the current command buffer - If
drawCountis equal to1, (offset+sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer - If
drawCountis greater than1, (stride× (drawCount- 1) +offset+sizeof(VkDrawIndexedIndirectCommand)) must be less than or equal to the size ofbuffer drawCountmust be less than or equal toVkPhysicalDeviceLimits::maxDrawIndirectCount- Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_GRAPHICSuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a uniform buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_GRAPHICSaccesses a storage buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - Any
VkImageViewbeing sampled withVK_FILTER_LINEARas a result of this command must be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must not have aVkImageViewTypeofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY - If the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnableset toVK_TRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theVK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
buffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
buffer, andcommandBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize
vkCmdDispatch :: ("commandBuffer" ::: VkCommandBuffer) -> ("groupCountX" ::: Word32) -> ("groupCountY" ::: Word32) -> ("groupCountZ" ::: Word32) -> IO () Source #
vkCmdDispatch - Dispatch compute work items
Parameters
commandBufferis the command buffer into which the command will be recorded.
groupCountXis the number of local workgroups to dispatch in the X dimension.groupCountYis the number of local workgroups to dispatch in the Y dimension.groupCountZis the number of local workgroups to dispatch in the Z dimension.
Description
When the command is executed, a global workgroup consisting of groupCountX × groupCountY × groupCountZ local workgroups is assembled.
Valid Usage
groupCountXmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]
groupCountYmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]groupCountZmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]- For each set n that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n atVK_PIPELINE_BIND_POINT_COMPUTE, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets, must be valid if they are statically used by the boundVkPipelineobject, specified viavkCmdBindPipeline - A valid compute pipeline must be bound to the current command
buffer with
VK_PIPELINE_BIND_POINT_COMPUTE - For each push constant that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set forVK_PIPELINE_BIND_POINT_COMPUTE, with aVkPipelineLayoutthat is compatible for push constants with the one used to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTEuses unnormalized coordinates, it must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTEuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTEuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_COMPUTEaccesses a uniform buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_COMPUTEaccesses a storage buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - Any
VkImageViewbeing sampled withVK_FILTER_LINEARas a result of this command must be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must not have aVkImageViewTypeofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute | Compute |
See Also
vkCmdDispatchIndirect :: ("commandBuffer" ::: VkCommandBuffer) -> ("buffer" ::: VkBuffer) -> ("offset" ::: VkDeviceSize) -> IO () Source #
vkCmdDispatchIndirect - Dispatch compute work items using indirect parameters
Parameters
commandBufferis the command buffer into which the command will be recorded.
bufferis the buffer containing dispatch parameters.offsetis the byte offset intobufferwhere parameters begin.
Description
vkCmdDispatchIndirect behaves similarly to vkCmdDispatch except that
the parameters are read by the device from a buffer during execution.
The parameters of the dispatch are encoded in a
VkDispatchIndirectCommand structure taken from buffer starting at
offset.
Valid Usage
- If
bufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
- For each set n that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTE, a descriptor set must have been bound to n atVK_PIPELINE_BIND_POINT_COMPUTE, with aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets, must be valid if they are statically used by the boundVkPipelineobject, specified viavkCmdBindPipeline - A valid compute pipeline must be bound to the current command
buffer with
VK_PIPELINE_BIND_POINT_COMPUTE buffermust have been created with theVK_BUFFER_USAGE_INDIRECT_BUFFER_BITbit setoffsetmust be a multiple of4- The sum of
offsetand the size ofVkDispatchIndirectCommandmust be less than or equal to the size ofbuffer - For each push constant that is statically used by the
VkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTE, a push constant value must have been set forVK_PIPELINE_BIND_POINT_COMPUTE, with aVkPipelineLayoutthat is compatible for push constants with the one used to create the currentVkPipeline, as described in {html_spec_relative}#descriptorsets-compatibility - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTEuses unnormalized coordinates, it must not be used to sample from anyVkImagewith aVkImageViewof the typeVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE,VK_IMAGE_VIEW_TYPE_1D_ARRAY,VK_IMAGE_VIEW_TYPE_2D_ARRAYorVK_IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTEuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If any
VkSamplerobject that is accessed from a shader by theVkPipelinebound toVK_PIPELINE_BIND_POINT_COMPUTEuses unnormalized coordinates, it must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_COMPUTEaccesses a uniform buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - If the robust buffer
access
feature is not enabled, and any shader stage in the
VkPipelineobject bound toVK_PIPELINE_BIND_POINT_COMPUTEaccesses a storage buffer, it must not access values outside of the range of that buffer specified in the bound descriptor set - Any
VkImageViewbeing sampled withVK_FILTER_LINEARas a result of this command must be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - Any
VkImageViewbeing sampled withVK_FILTER_CUBIC_IMGas a result of this command must not have aVkImageViewTypeofVK_IMAGE_VIEW_TYPE_3D,VK_IMAGE_VIEW_TYPE_CUBE, orVK_IMAGE_VIEW_TYPE_CUBE_ARRAY
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
buffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support compute operations - This command must only be called outside of a render pass instance
- Both of
buffer, andcommandBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Compute | Compute |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize
vkCmdCopyBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcBuffer" ::: VkBuffer) -> ("dstBuffer" ::: VkBuffer) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkBufferCopy) -> IO () Source #
vkCmdCopyBuffer - Copy data between buffer regions
Parameters
commandBufferis the command buffer into which the command will be recorded.
srcBufferis the source buffer.dstBufferis the destination buffer.regionCountis the number of regions to copy.pRegionsis a pointer to an array ofVkBufferCopystructures specifying the regions to copy.
Description
Each region in pRegions is copied from the source buffer to the same
region of the destination buffer. srcBuffer and dstBuffer can be
the same buffer or alias the same memory, but the result is undefined if
the copy regions overlap in memory.
Valid Usage
- The
sizemember of each element ofpRegionsmust be greater than0
- The
srcOffsetmember of each element ofpRegionsmust be less than the size ofsrcBuffer - The
dstOffsetmember of each element ofpRegionsmust be less than the size ofdstBuffer - The
sizemember of each element ofpRegionsmust be less than or equal to the size ofsrcBufferminussrcOffset - The
sizemember of each element ofpRegionsmust be less than or equal to the size ofdstBufferminusdstOffset - The union of the source regions, and the union of the destination
regions, specified by the elements of
pRegions, must not overlap in memory srcBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_SRC_BITusage flag- If
srcBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_DST_BITusage flag- If
dstBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcBuffermust be a validVkBufferhandledstBuffermust be a validVkBufferhandlepRegionsmust be a valid pointer to an array ofregionCountVkBufferCopystructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCountmust be greater than0- Each of
commandBuffer,dstBuffer, andsrcBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Transfer Graphics Compute | Transfer |
See Also
vkCmdCopyImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkImageCopy) -> IO () Source #
vkCmdCopyImage - Copy data between images
Parameters
commandBufferis the command buffer into which the command will be recorded.
srcImageis the source image.srcImageLayoutis the current layout of the source image subresource.dstImageis the destination image.dstImageLayoutis the current layout of the destination image subresource.regionCountis the number of regions to copy.pRegionsis a pointer to an array ofVkImageCopystructures specifying the regions to copy.
Description
Each region in pRegions is copied from the source image to the same
region of the destination image. srcImage and dstImage can be the
same image or alias the same memory.
The formats of srcImage and dstImage must be compatible. Formats
are considered compatible if their element size is the same between both
formats. For example, VK_FORMAT_R8G8B8A8_UNORM is compatible with
VK_FORMAT_R32_UINT because both texels are 4 bytes in size.
Depth/stencil formats must match exactly.
If the format of srcImage or dstImage is a /multi-planar/ image
format,
regions of each plane to be copied must be specified separately using
the srcSubresource and dstSubresource members of the VkImageCopy
structure. In this case, the aspectMask of the srcSubresource or
dstSubresource that refers to the multi-planar image must be
VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or
VK_IMAGE_ASPECT_PLANE_2_BIT. For the purposes of vkCmdCopyImage,
each plane of a multi-planar image is treated as having the format
listed in
{html_spec_relative}#features-formats-compatible-planes
for the plane identified by the aspectMask of the corresponding
subresource. This applies both to VkFormat
and to coordinates used in the copy, which correspond to texels in the
plane rather than how these texels map to coordinates in the image as
a whole.
Note
For example, the VK_IMAGE_ASPECT_PLANE_1_BIT plane of a
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM image is compatible with an image
of format VK_FORMAT_R8G8_UNORM and (less usefully) with the
VK_IMAGE_ASPECT_PLANE_0_BIT plane of an image of format
VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16, as each texel is
2 bytes in size.
vkCmdCopyImage allows copying between size-compatible compressed and
uncompressed internal formats. Formats are size-compatible if the
element size of the uncompressed format is equal to the element size
(compressed texel block size) of the compressed format. Such a copy does
not perform on-the-fly compression or decompression. When copying from
an uncompressed format to a compressed format, each texel of
uncompressed data of the source image is copied as a raw value to the
corresponding compressed texel block of the destination image. When
copying from a compressed format to an uncompressed format, each
compressed texel block of the source image is copied as a raw value to
the corresponding texel of uncompressed data in the destination image.
Thus, for example, it is legal to copy between a 128-bit uncompressed
format and a compressed format which has a 128-bit sized compressed
texel block representing 4×4 texels (using 8 bits per texel), or between
a 64-bit uncompressed format and a compressed format which has a 64-bit
sized compressed texel block representing 4×4 texels (using 4 bits per
texel).
When copying between compressed and uncompressed formats the extent
members represent the texel dimensions of the source image and not the
destination. When copying from a compressed image to an uncompressed
image the image texel dimensions written to the uncompressed image will
be source extent divided by the compressed texel block dimensions. When
copying from an uncompressed image to a compressed image the image texel
dimensions written to the compressed image will be the source extent
multiplied by the compressed texel block dimensions. In both cases the
number of bytes read and the number of bytes written will be identical.
Copying to or from block-compressed images is typically done in
multiples of the compressed texel block size. For this reason the
extent must be a multiple of the compressed texel block dimension.
There is one exception to this rule which is required to handle
compressed images created with dimensions that are not a multiple of the
compressed texel block dimensions: if the srcImage is compressed,
then:
- If
extent.widthis not a multiple of the compressed texel block width, then (extent.width+srcOffset.x) must equal the image subresource width. - If
extent.heightis not a multiple of the compressed texel block height, then (extent.height+srcOffset.y) must equal the image subresource height. - If
extent.depthis not a multiple of the compressed texel block depth, then (extent.depth+srcOffset.z) must equal the image subresource depth.
Similarly, if the dstImage is compressed, then:
- If
extent.widthis not a multiple of the compressed texel block width, then (extent.width+dstOffset.x) must equal the image subresource width. - If
extent.heightis not a multiple of the compressed texel block height, then (extent.height+dstOffset.y) must equal the image subresource height. - If
extent.depthis not a multiple of the compressed texel block depth, then (extent.depth+dstOffset.z) must equal the image subresource depth.
This allows the last compressed texel block of the image in each non-multiple dimension to be included as a source or destination of the copy.
“_422” image formats that are not
/multi-planar/
are treated as having a 2×1 compressed texel block for the purposes of
these rules.
vkCmdCopyImage can be used to copy image data between multisample
images, but both images must have the same number of samples.
Valid Usage
- The source region specified by each element of
pRegionsmust be a region that is contained withinsrcImageif thesrcImage’sVkFormatis not a multi-planar format, and must be a region that is contained within the plane being copied if thesrcImage’sVkFormatis a multi-planar format
- The destination region specified by each element of
pRegionsmust be a region that is contained withindstImageif thedstImage’sVkFormatis not a multi-planar format, and must be a region that is contained within the plane being copied to if thedstImage’sVkFormatis a multi-planar format - The union of all source regions, and the union of all destination
regions, specified by the elements of
pRegions, must not overlap in memory srcImagemust use a format that supportsVK_FORMAT_FEATURE_TRANSFER_SRC_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatPropertiessrcImagemust have been created withVK_IMAGE_USAGE_TRANSFER_SRC_BITusage flag- If
srcImageis non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a singleVkDeviceMemoryobject srcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevicesrcImageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHRdstImagemust use a format that supportsVK_FORMAT_FEATURE_TRANSFER_DST_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatPropertiesdstImagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flag- If
dstImageis non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a singleVkDeviceMemoryobject dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevicedstImageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR- If the
VkFormatof each ofsrcImageanddstImageis not a /multi-planar format/, theVkFormatof each ofsrcImageanddstImagemust be compatible, as defined below - In a copy to or from a plane of a multi-planar
image,
the
VkFormatof the image and plane must be compatible according to the description of compatible planes for the plane being copied - When a copy is performed to or from an image with a multi-planar
format,
the
aspectMaskof thesrcSubresourceand/ordstSubresourcethat refers to the multi-planar image must beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT(withVK_IMAGE_ASPECT_PLANE_2_BITvalid only for aVkFormatwith three planes) - The sample count of
srcImageanddstImagemust match - The
srcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhendstImagewas created - The
srcSubresource.baseArrayLayer+srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.baseArrayLayer+dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhendstImagewas created - The
srcOffsetand andextentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties - The
dstOffsetand andextentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcImagemust be a validVkImagehandlesrcImageLayoutmust be a validVkImageLayoutvaluedstImagemust be a validVkImagehandledstImageLayoutmust be a validVkImageLayoutvaluepRegionsmust be a valid pointer to an array ofregionCountvalidVkImageCopystructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCountmust be greater than0- Each of
commandBuffer,dstImage, andsrcImagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Transfer Graphics Compute | Transfer |
See Also
vkCmdBlitImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkImageBlit) -> ("filter" ::: VkFilter) -> IO () Source #
vkCmdBlitImage - Copy regions of an image, potentially performing format conversion,
Parameters
commandBufferis the command buffer into which the command will be recorded.
srcImageis the source image.srcImageLayoutis the layout of the source image subresources for the blit.dstImageis the destination image.dstImageLayoutis the layout of the destination image subresources for the blit.regionCountis the number of regions to blit.pRegionsis a pointer to an array ofVkImageBlitstructures specifying the regions to blit.filteris aVkFilterspecifying the filter to apply if the blits require scaling.
Description
vkCmdBlitImage must not be used for multisampled source or
destination images. Use vkCmdResolveImage for this purpose.
As the sizes of the source and destination extents can differ in any dimension, texels in the source extent are scaled and filtered to the destination extent. Scaling occurs via the following operations:
For each destination texel, the integer coordinate of that texel is converted to an unnormalized texture coordinate, using the effective inverse of the equations described in unnormalized to integer conversion:
- ubase = i + ½
- vbase = j + ½
- wbase = k + ½
These base coordinates are then offset by the first destination offset:
- uoffset = ubase - xdst0
- voffset = vbase - ydst0
- woffset = wbase - zdst0
- aoffset = a -
baseArrayCountdst
The scale is determined from the source and destination regions, and applied to the offset coordinates:
- scale_u = (xsrc1 - xsrc0) / (xdst1 - xdst0)
- scale_v = (ysrc1 - ysrc0) / (ydst1 - ydst0)
- scale_w = (zsrc1 - zsrc0) / (zdst1 - zdst0)
- uscaled = uoffset * scaleu
- vscaled = voffset * scalev
- wscaled = woffset * scalew
Finally the source offset is added to the scaled coordinates, to determine the final unnormalized coordinates used to sample from
srcImage:- u = uscaled + xsrc0
- v = vscaled + ysrc0
- w = wscaled + zsrc0
- q =
mipLevel - a = aoffset +
baseArrayCountsrc
These coordinates are used to sample from the source image, as described
in Image Operations
chapter,
with the filter mode equal to that of filter, a mipmap mode of
VK_SAMPLER_MIPMAP_MODE_NEAREST and an address mode of
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE. Implementations must clamp at
the edge of the source image, and may additionally clamp to the edge
of the source region.
Note
Due to allowable rounding errors in the generation of the source texture coordinates, it is not always possible to guarantee exactly which source texels will be sampled for a given blit. As rounding errors are implementation dependent, the exact results of a blitting operation are also implementation dependent.
Blits are done layer by layer starting with the baseArrayLayer member
of srcSubresource for the source and dstSubresource for the
destination. layerCount layers are blitted to the destination image.
3D textures are blitted slice by slice. Slices in the source region
bounded by srcOffsets[0].z and srcOffsets[1].z are copied to
slices in the destination region bounded by dstOffsets[0].z and
dstOffsets[1].z. For each destination slice, a source z
coordinate is linearly interpolated between srcOffsets[0].z and
srcOffsets[1].z. If the filter parameter is VK_FILTER_LINEAR
then the value sampled from the source image is taken by doing linear
filtering using the interpolated z coordinate. If filter parameter
is VK_FILTER_NEAREST then value sampled from the source image is taken
from the single nearest slice (with undefined rounding mode).
The following filtering and conversion rules apply:
- Integer formats can only be converted to other integer formats with the same signedness.
- No format conversion is supported between depth/stencil images. The formats must match.
- Format conversions on unorm, snorm, unscaled and packed float formats of the copied aspect of the image are performed by first converting the pixels to float values.
- For sRGB source formats, nonlinear RGB values are converted to linear representation prior to filtering.
- After filtering, the float values are first clamped and then cast to the destination image format. In case of sRGB destination format, linear RGB values are converted to nonlinear representation before writing the pixel to the image.
Signed and unsigned integers are converted by first clamping to the representable range of the destination format, then casting the value.
Valid Usage
- The source region specified by each element of
pRegionsmust be a region that is contained withinsrcImage
- The destination region specified by each element of
pRegionsmust be a region that is contained withindstImage - The union of all destination regions, specified by the elements of
pRegions, must not overlap in memory with any texel that may be sampled during the blit operation srcImagemust use a format that supportsVK_FORMAT_FEATURE_BLIT_SRC_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatPropertiessrcImagemust not use a format listed in {html_spec_relative}#features-formats-requiring-sampler-ycbcr-conversionsrcImagemust have been created withVK_IMAGE_USAGE_TRANSFER_SRC_BITusage flag- If
srcImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject srcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevicesrcImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMALorVK_IMAGE_LAYOUT_GENERALdstImagemust use a format that supportsVK_FORMAT_FEATURE_BLIT_DST_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatPropertiesdstImagemust not use a format listed in {html_spec_relative}#features-formats-requiring-sampler-ycbcr-conversiondstImagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flag- If
dstImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevicedstImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMALorVK_IMAGE_LAYOUT_GENERAL- The sample count of
srcImageanddstImagemust both be equal toVK_SAMPLE_COUNT_1_BIT - If either of
srcImageordstImagewas created with a signed integerVkFormat, the other must also have been created with a signed integerVkFormat - If either of
srcImageordstImagewas created with an unsigned integerVkFormat, the other must also have been created with an unsigned integerVkFormat - If either of
srcImageordstImagewas created with a depth/stencil format, the other must have exactly the same format - If
srcImagewas created with a depth/stencil format,filtermust beVK_FILTER_NEAREST srcImagemust have been created with asamplesvalue ofVK_SAMPLE_COUNT_1_BITdstImagemust have been created with asamplesvalue ofVK_SAMPLE_COUNT_1_BIT- If
filterisVK_FILTER_LINEAR,srcImagemust be of a format which supports linear filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - If
filterisVK_FILTER_CUBIC_IMG,srcImagemust be of a format which supports cubic filtering, as specified by theVK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMGflag inVkFormatProperties::linearTilingFeatures(for a linear image) orVkFormatProperties::optimalTilingFeatures(for an optimally tiled image) returned byvkGetPhysicalDeviceFormatProperties - If
filterisVK_FILTER_CUBIC_IMG,srcImagemust have aVkImageTypeofVK_IMAGE_TYPE_3D - The
srcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhendstImagewas created - The
srcSubresource.baseArrayLayer+srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.baseArrayLayer+dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhendstImagewas created
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcImagemust be a validVkImagehandlesrcImageLayoutmust be a validVkImageLayoutvaluedstImagemust be a validVkImagehandledstImageLayoutmust be a validVkImageLayoutvaluepRegionsmust be a valid pointer to an array ofregionCountvalidVkImageBlitstructuresfiltermust be a validVkFiltervaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a render pass instance
regionCountmust be greater than0- Each of
commandBuffer,dstImage, andsrcImagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics | Transfer |
See Also
VkCommandBuffer,
VkFilter,
VkImage, VkImageBlit,
VkImageLayout
vkCmdCopyBufferToImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcBuffer" ::: VkBuffer) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkBufferImageCopy) -> IO () Source #
vkCmdCopyBufferToImage - Copy data from a buffer into an image
Parameters
commandBufferis the command buffer into which the command will be recorded.
srcBufferis the source buffer.dstImageis the destination image.dstImageLayoutis the layout of the destination image subresources for the copy.regionCountis the number of regions to copy.pRegionsis a pointer to an array ofVkBufferImageCopystructures specifying the regions to copy.
Description
Each region in pRegions is copied from the specified region of the
source buffer to the specified region of the destination image.
If the format of dstImage is a multi-planar image
format),
regions of each plane to be a target of a copy must be specified
separately using the pRegions member of the VkBufferImageCopy
structure. In this case, the aspectMask of imageSubresource must
be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or
VK_IMAGE_ASPECT_PLANE_2_BIT. For the purposes of
vkCmdCopyBufferToImage, each plane of a multi-planar image is treated
as having the format listed in
{html_spec_relative}#features-formats-compatible-planes
for the plane identified by the aspectMask of the corresponding
subresource. This applies both to VkFormat
and to coordinates used in the copy, which correspond to texels in the
plane rather than how these texels map to coordinates in the image as
a whole.
Valid Usage
- The buffer region specified by each element of
pRegionsmust be a region that is contained withinsrcBuffer
- The image region specified by each element of
pRegionsmust be a region that is contained withindstImageif thedstImage’sVkFormatis not a multi-planar format, and must be a region that is contained within the plane being copied to if thedstImage’sVkFormatis a multi-planar format - The union of all source regions, and the union of all destination
regions, specified by the elements of
pRegions, must not overlap in memory srcBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_SRC_BITusage flagdstImagemust use a format that supportsVK_FORMAT_FEATURE_TRANSFER_DST_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatProperties- If
srcBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstImagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flag- If
dstImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstImagemust have a sample count equal toVK_SAMPLE_COUNT_1_BITdstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevicedstImageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR- The
imageSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhendstImagewas created - The
imageSubresource.baseArrayLayer+imageSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhendstImagewas created - The
imageOffsetand andimageExtentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcBuffermust be a validVkBufferhandledstImagemust be a validVkImagehandledstImageLayoutmust be a validVkImageLayoutvaluepRegionsmust be a valid pointer to an array ofregionCountvalidVkBufferImageCopystructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCountmust be greater than0- Each of
commandBuffer,dstImage, andsrcBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Transfer Graphics Compute | Transfer |
See Also
VkBuffer, VkBufferImageCopy,
VkCommandBuffer,
VkImage,
VkImageLayout
vkCmdCopyImageToBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstBuffer" ::: VkBuffer) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkBufferImageCopy) -> IO () Source #
vkCmdCopyImageToBuffer - Copy image data into a buffer
Parameters
commandBufferis the command buffer into which the command will be recorded.
srcImageis the source image.srcImageLayoutis the layout of the source image subresources for the copy.dstBufferis the destination buffer.regionCountis the number of regions to copy.pRegionsis a pointer to an array ofVkBufferImageCopystructures specifying the regions to copy.
Description
Each region in pRegions is copied from the specified region of the
source image to the specified region of the destination buffer.
If the VkFormat of srcImage is a
multi-planar image
format,
regions of each plane to be a source of a copy must be specified
separately using the pRegions member of the VkBufferImageCopy
structure. In this case, the aspectMask of imageSubresource must
be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, or
VK_IMAGE_ASPECT_PLANE_2_BIT. For the purposes of
vkCmdCopyBufferToImage, each plane of a multi-planar image is treated
as having the format listed in
{html_spec_relative}#features-formats-compatible-planes
for the plane identified by the aspectMask of the corresponding
subresource. This applies both to VkFormat
and to coordinates used in the copy, which correspond to texels in the
plane rather than how these texels map to coordinates in the image as
a whole.
Valid Usage
- The image region specified by each element of
pRegionsmust be a region that is contained withinsrcImageif thesrcImage’sVkFormatis not a multi-planar format, and must be a region that is contained within the plane being copied if thesrcImage’sVkFormatis a multi-planar format
- The buffer region specified by each element of
pRegionsmust be a region that is contained withindstBuffer - The union of all source regions, and the union of all destination
regions, specified by the elements of
pRegions, must not overlap in memory srcImagemust use a format that supportsVK_FORMAT_FEATURE_TRANSFER_SRC_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatPropertiessrcImagemust have been created withVK_IMAGE_USAGE_TRANSFER_SRC_BITusage flag- If
srcImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject srcImagemust have a sample count equal toVK_SAMPLE_COUNT_1_BITsrcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevicesrcImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMALorVK_IMAGE_LAYOUT_GENERALdstBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_DST_BITusage flag- If
dstBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - The
imageSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhensrcImagewas created - The
imageSubresource.baseArrayLayer+imageSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhensrcImagewas created - The
imageOffsetand andimageExtentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcImagemust be a validVkImagehandlesrcImageLayoutmust be a validVkImageLayoutvaluedstBuffermust be a validVkBufferhandlepRegionsmust be a valid pointer to an array ofregionCountvalidVkBufferImageCopystructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCountmust be greater than0- Each of
commandBuffer,dstBuffer, andsrcImagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Transfer Graphics Compute | Transfer |
See Also
VkBuffer, VkBufferImageCopy,
VkCommandBuffer,
VkImage,
VkImageLayout
vkCmdUpdateBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("dstBuffer" ::: VkBuffer) -> ("dstOffset" ::: VkDeviceSize) -> ("dataSize" ::: VkDeviceSize) -> ("pData" ::: Ptr ()) -> IO () Source #
vkCmdUpdateBuffer - Update a buffer’s contents from host memory
Parameters
commandBufferis the command buffer into which the command will be recorded.
dstBufferis a handle to the buffer to be updated.dstOffsetis the byte offset into the buffer to start updating, and must be a multiple of 4.dataSizeis the number of bytes to update, and must be a multiple of 4.pDatais a pointer to the source data for the buffer update, and must be at leastdataSizebytes in size.
Description
dataSize must be less than or equal to 65536 bytes. For larger
updates, applications can use buffer to buffer
copies.
Note
Buffer updates performed with vkCmdUpdateBuffer first copy the data
into command buffer memory when the command is recorded (which requires
additional storage and may incur an additional allocation), and then
copy the data from the command buffer into dstBuffer when the command
is executed on a device.
The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.
Applications can work around this by issuing multiple
vkCmdUpdateBuffer commands to different ranges of the same buffer, but
it is strongly recommended that they should not.
The source data is copied from the user pointer to the command buffer when the command is called.
vkCmdUpdateBuffer is only allowed outside of a render pass. This
command is treated as “transfer” operation, for the purposes of
synchronization barriers. The VK_BUFFER_USAGE_TRANSFER_DST_BIT must
be specified in usage of
VkBufferCreateInfo in order for the
buffer to be compatible with vkCmdUpdateBuffer.
Valid Usage
dstOffsetmust be less than the size ofdstBuffer
dataSizemust be less than or equal to the size ofdstBufferminusdstOffsetdstBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_DST_BITusage flag- If
dstBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstOffsetmust be a multiple of4dataSizemust be less than or equal to65536dataSizemust be a multiple of4
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
dstBuffermust be a validVkBufferhandlepDatamust be a valid pointer to an array ofdataSizebytescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
dataSizemust be greater than0- Both of
commandBuffer, anddstBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Transfer Graphics Compute | Transfer |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize
vkCmdFillBuffer :: ("commandBuffer" ::: VkCommandBuffer) -> ("dstBuffer" ::: VkBuffer) -> ("dstOffset" ::: VkDeviceSize) -> ("size" ::: VkDeviceSize) -> ("data" ::: Word32) -> IO () Source #
vkCmdFillBuffer - Fill a region of a buffer with a fixed value
Parameters
commandBufferis the command buffer into which the command will be recorded.
dstBufferis the buffer to be filled.dstOffsetis the byte offset into the buffer at which to start filling, and must be a multiple of 4.sizeis the number of bytes to fill, and must be either a multiple of 4, orVK_WHOLE_SIZEto fill the range fromoffsetto the end of the buffer. IfVK_WHOLE_SIZEis used and the remaining size of the buffer is not a multiple of 4, then the nearest smaller multiple is used.datais the 4-byte word written repeatedly to the buffer to fillsizebytes of data. The data word is written to memory according to the host endianness.
Description
vkCmdFillBuffer is treated as “transfer” operation for the purposes of
synchronization barriers. The VK_BUFFER_USAGE_TRANSFER_DST_BIT must
be specified in usage of VkBufferCreateInfo in order for the buffer
to be compatible with vkCmdFillBuffer.
Valid Usage
dstOffsetmust be less than the size ofdstBuffer
dstOffsetmust be a multiple of4- If
sizeis not equal toVK_WHOLE_SIZE,sizemust be greater than0 - If
sizeis not equal toVK_WHOLE_SIZE,sizemust be less than or equal to the size ofdstBufferminusdstOffset - If
sizeis not equal toVK_WHOLE_SIZE,sizemust be a multiple of4 dstBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_DST_BITusage flag- If
dstBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
dstBuffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer, anddstBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Transfer Graphics Compute | Transfer |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize
vkCmdClearColorImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("image" ::: VkImage) -> ("imageLayout" ::: VkImageLayout) -> ("pColor" ::: Ptr VkClearColorValue) -> ("rangeCount" ::: Word32) -> ("pRanges" ::: Ptr VkImageSubresourceRange) -> IO () Source #
vkCmdClearColorImage - Clear regions of a color image
Parameters
commandBufferis the command buffer into which the command will be recorded.
imageis the image to be cleared.imageLayoutspecifies the current layout of the image subresource ranges to be cleared, and must beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_GENERALorVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL.pColoris a pointer to aVkClearColorValuestructure that contains the values the image subresource ranges will be cleared to (see {html_spec_relative}#clears-values below).rangeCountis the number of image subresource range structures inpRanges.pRangespoints to an array ofVkImageSubresourceRangestructures that describe a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views. TheaspectMaskof all image subresource ranges must only includeVK_IMAGE_ASPECT_COLOR_BIT.
Description
Each specified range in pRanges is cleared to the value specified by
pColor.
Valid Usage
imagemust use a format that supportsVK_FORMAT_FEATURE_TRANSFER_DST_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatProperties
imagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flagimagemust not use a format listed in {html_spec_relative}#features-formats-requiring-sampler-ycbcr-conversion- If
imageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject imageLayoutmust specify the layout of the image subresource ranges ofimagespecified inpRangesat the time this command is executed on aVkDeviceimageLayoutmust beVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,VK_IMAGE_LAYOUT_GENERAL, orVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR- The
VkImageSubresourceRange::baseMipLevelmembers of the elements of thepRangesarray must each be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created - For each
VkImageSubresourceRangeelement ofpRanges, if thelevelCountmember is notVK_REMAINING_MIP_LEVELS, thenbaseMipLevel+levelCountmust be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created - The
VkImageSubresourceRange::baseArrayLayermembers of the elements of thepRangesarray must each be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created - For each
VkImageSubresourceRangeelement ofpRanges, if thelayerCountmember is notVK_REMAINING_ARRAY_LAYERS, thenbaseArrayLayer+layerCountmust be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created imagemust not have a compressed or depth/stencil format
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
imagemust be a validVkImagehandleimageLayoutmust be a validVkImageLayoutvaluepColormust be a valid pointer to a validVkClearColorValueunionpRangesmust be a valid pointer to an array ofrangeCountvalidVkImageSubresourceRangestructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
rangeCountmust be greater than0- Both of
commandBuffer, andimagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics Compute | Transfer |
See Also
VkClearColorValue, VkCommandBuffer,
VkImage,
VkImageLayout,
VkImageSubresourceRange
vkCmdClearDepthStencilImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("image" ::: VkImage) -> ("imageLayout" ::: VkImageLayout) -> ("pDepthStencil" ::: Ptr VkClearDepthStencilValue) -> ("rangeCount" ::: Word32) -> ("pRanges" ::: Ptr VkImageSubresourceRange) -> IO () Source #
vkCmdClearDepthStencilImage - Fill regions of a combined depth/stencil image
Parameters
commandBufferis the command buffer into which the command will be recorded.
imageis the image to be cleared.imageLayoutspecifies the current layout of the image subresource ranges to be cleared, and must beVK_IMAGE_LAYOUT_GENERALorVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL.pDepthStencilis a pointer to aVkClearDepthStencilValuestructure that contains the values the depth and stencil image subresource ranges will be cleared to (see {html_spec_relative}#clears-values below).rangeCountis the number of image subresource range structures inpRanges.pRangespoints to an array ofVkImageSubresourceRangestructures that describe a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views. TheaspectMaskof each image subresource range inpRangescan includeVK_IMAGE_ASPECT_DEPTH_BITif the image format has a depth component, andVK_IMAGE_ASPECT_STENCIL_BITif the image format has a stencil component.pDepthStencilis a pointer to aVkClearDepthStencilValuestructure that contains the values the image subresource ranges will be cleared to (see {html_spec_relative}#clears-values below).
Valid Usage
imagemust use a format that supportsVK_FORMAT_FEATURE_TRANSFER_DST_BIT, which is indicated byVkFormatProperties::linearTilingFeatures(for linearly tiled images) orVkFormatProperties::optimalTilingFeatures(for optimally tiled images) - as returned byvkGetPhysicalDeviceFormatProperties
imagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITusage flag- If
imageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject imageLayoutmust specify the layout of the image subresource ranges ofimagespecified inpRangesat the time this command is executed on aVkDeviceimageLayoutmust be either ofVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMALorVK_IMAGE_LAYOUT_GENERAL- The
VkImageSubresourceRange::baseMipLevelmembers of the elements of thepRangesarray must each be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created - For each
VkImageSubresourceRangeelement ofpRanges, if thelevelCountmember is notVK_REMAINING_MIP_LEVELS, thenbaseMipLevel+levelCountmust be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created - The
VkImageSubresourceRange::baseArrayLayermembers of the elements of thepRangesarray must each be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created - For each
VkImageSubresourceRangeelement ofpRanges, if thelayerCountmember is notVK_REMAINING_ARRAY_LAYERS, thenbaseArrayLayer+layerCountmust be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created imagemust have a depth/stencil format
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
imagemust be a validVkImagehandleimageLayoutmust be a validVkImageLayoutvaluepDepthStencilmust be a valid pointer to a validVkClearDepthStencilValuestructurepRangesmust be a valid pointer to an array ofrangeCountvalidVkImageSubresourceRangestructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a render pass instance
rangeCountmust be greater than0- Both of
commandBuffer, andimagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics | Transfer |
See Also
VkClearDepthStencilValue,
VkCommandBuffer,
VkImage,
VkImageLayout,
VkImageSubresourceRange
vkCmdClearAttachments :: ("commandBuffer" ::: VkCommandBuffer) -> ("attachmentCount" ::: Word32) -> ("pAttachments" ::: Ptr VkClearAttachment) -> ("rectCount" ::: Word32) -> ("pRects" ::: Ptr VkClearRect) -> IO () Source #
vkCmdClearAttachments - Clear regions within bound framebuffer attachments
Parameters
commandBufferis the command buffer into which the command will be recorded.
attachmentCountis the number of entries in thepAttachmentsarray.pAttachmentsis a pointer to an array ofVkClearAttachmentstructures defining the attachments to clear and the clear values to use.rectCountis the number of entries in thepRectsarray.pRectspoints to an array ofVkClearRectstructures defining regions within each selected attachment to clear.
Description
vkCmdClearAttachments can clear multiple regions of each attachment
used in the current subpass of a render pass instance. This command
must be called only inside a render pass instance, and implicitly
selects the images to clear based on the current framebuffer attachments
and the command parameters.
Valid Usage
- If the
aspectMaskmember of any element ofpAttachmentscontainsVK_IMAGE_ASPECT_COLOR_BIT, thecolorAttachmentmember of that element must refer to a valid color attachment in the current subpass
- The rectangular region specified by each element of
pRectsmust be contained within the render area of the current render pass instance - The layers specified by each element of
pRectsmust be contained within every attachment thatpAttachmentsrefers to - If the render pass instance this is recorded in uses multiview, then
baseArrayLayermust be zero andlayerCountmust be one.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pAttachmentsmust be a valid pointer to an array ofattachmentCountvalidVkClearAttachmentstructurespRectsmust be a valid pointer to an array ofrectCountVkClearRectstructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
attachmentCountmust be greater than0rectCountmust be greater than0
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
See Also
vkCmdResolveImage :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcImage" ::: VkImage) -> ("srcImageLayout" ::: VkImageLayout) -> ("dstImage" ::: VkImage) -> ("dstImageLayout" ::: VkImageLayout) -> ("regionCount" ::: Word32) -> ("pRegions" ::: Ptr VkImageResolve) -> IO () Source #
vkCmdResolveImage - Resolve regions of an image
Parameters
commandBufferis the command buffer into which the command will be recorded.
srcImageis the source image.srcImageLayoutis the layout of the source image subresources for the resolve.dstImageis the destination image.dstImageLayoutis the layout of the destination image subresources for the resolve.regionCountis the number of regions to resolve.pRegionsis a pointer to an array ofVkImageResolvestructures specifying the regions to resolve.
Description
During the resolve the samples corresponding to each pixel location in the source are converted to a single sample before being written to the destination. If the source formats are floating-point or normalized types, the sample values for each pixel are resolved in an implementation-dependent manner. If the source formats are integer types, a single sample’s value is selected for each pixel.
srcOffset and dstOffset select the initial x, y, and z offsets
in texels of the sub-regions of the source and destination image data.
extent is the size in texels of the source image to resolve in
width, height and depth.
Resolves are done layer by layer starting with baseArrayLayer member
of srcSubresource for the source and dstSubresource for the
destination. layerCount layers are resolved to the destination image.
Valid Usage
- The source region specified by each element of
pRegionsmust be a region that is contained withinsrcImage
- The destination region specified by each element of
pRegionsmust be a region that is contained withindstImage - The union of all source regions, and the union of all destination
regions, specified by the elements of
pRegions, must not overlap in memory - If
srcImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject srcImagemust have a sample count equal to any valid sample count value other thanVK_SAMPLE_COUNT_1_BIT- If
dstImageis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject dstImagemust have a sample count equal toVK_SAMPLE_COUNT_1_BITsrcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevicesrcImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMALorVK_IMAGE_LAYOUT_GENERALdstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevicedstImageLayoutmust beVK_IMAGE_LAYOUT_SHARED_PRESENT_KHR,VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMALorVK_IMAGE_LAYOUT_GENERAL- If
dstImagewas created withtilingequal toVK_IMAGE_TILING_LINEAR,dstImagemust have been created with aformatthat supports being a color attachment, as specified by theVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BITflag inVkFormatProperties::linearTilingFeaturesreturned byvkGetPhysicalDeviceFormatProperties - If
dstImagewas created withtilingequal toVK_IMAGE_TILING_OPTIMAL,dstImagemust have been created with aformatthat supports being a color attachment, as specified by theVK_FORMAT_FEATURE_COLOR_ATTACHMENT_BITflag inVkFormatProperties::optimalTilingFeaturesreturned byvkGetPhysicalDeviceFormatProperties srcImageanddstImagemust have been created with the same image format- The
srcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhendstImagewas created - The
srcSubresource.baseArrayLayer+srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.baseArrayLayer+dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhendstImagewas created
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcImagemust be a validVkImagehandlesrcImageLayoutmust be a validVkImageLayoutvaluedstImagemust be a validVkImagehandledstImageLayoutmust be a validVkImageLayoutvaluepRegionsmust be a valid pointer to an array ofregionCountvalidVkImageResolvestructurescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a render pass instance
regionCountmust be greater than0- Each of
commandBuffer,dstImage, andsrcImagemust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics | Transfer |
See Also
vkCmdSetEvent :: ("commandBuffer" ::: VkCommandBuffer) -> ("event" ::: VkEvent) -> ("stageMask" ::: VkPipelineStageFlags) -> IO () Source #
vkCmdSetEvent - Set an event object to signaled state
Parameters
commandBufferis the command buffer into which the command is recorded.
eventis the event that will be signaled.stageMaskspecifies the source stage mask used to determine when theeventis signaled.
Description
When vkCmdSetEvent is submitted to a queue, it defines an execution
dependency on commands that were submitted before it, and defines an
event signal operation which sets the event to the signaled state.
The first synchronization
scope
includes all commands that occur earlier in submission
order.
The synchronization scope is limited to operations on the pipeline
stages determined by the source stage
mask
specified by stageMask.
The second synchronization scope includes only the event signal operation.
If event is already in the signaled state when vkCmdSetEvent is
executed on the device, then vkCmdSetEvent has no effect, no event
signal operation occurs, and no execution dependency is generated.
Valid Usage
stageMaskmust not includeVK_PIPELINE_STAGE_HOST_BIT
- If the geometry
shaders
feature is not enabled,
stageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the tessellation
shaders
feature is not enabled,
stageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT commandBuffer’s current device mask must include exactly one physical device.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
eventmust be a validVkEventhandlestageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluesstageMaskmust not be0commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer, andeventmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics Compute |
See Also
vkCmdResetEvent :: ("commandBuffer" ::: VkCommandBuffer) -> ("event" ::: VkEvent) -> ("stageMask" ::: VkPipelineStageFlags) -> IO () Source #
vkCmdResetEvent - Reset an event object to non-signaled state
Parameters
commandBufferis the command buffer into which the command is recorded.
eventis the event that will be unsignaled.stageMaskis a bitmask ofVkPipelineStageFlagBitsspecifying the source stage mask used to determine when theeventis unsignaled.
Description
When vkCmdResetEvent is submitted to a queue, it defines an execution
dependency on commands that were submitted before it, and defines an
event unsignal operation which resets the event to the unsignaled state.
The first synchronization
scope
includes all commands that occur earlier in submission
order.
The synchronization scope is limited to operations on the pipeline
stages determined by the source stage
mask
specified by stageMask.
The second synchronization scope includes only the event unsignal operation.
If event is already in the unsignaled state when vkCmdResetEvent is
executed on the device, then vkCmdResetEvent has no effect, no event
unsignal operation occurs, and no execution dependency is generated.
Valid Usage
stageMaskmust not includeVK_PIPELINE_STAGE_HOST_BIT
- If the geometry
shaders
feature is not enabled,
stageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the tessellation
shaders
feature is not enabled,
stageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - When this command executes,
eventmust not be waited on by avkCmdWaitEventscommand that is currently executing commandBuffer’s current device mask must include exactly one physical device.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
eventmust be a validVkEventhandlestageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluesstageMaskmust not be0commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer, andeventmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics Compute |
See Also
vkCmdWaitEvents :: ("commandBuffer" ::: VkCommandBuffer) -> ("eventCount" ::: Word32) -> ("pEvents" ::: Ptr VkEvent) -> ("srcStageMask" ::: VkPipelineStageFlags) -> ("dstStageMask" ::: VkPipelineStageFlags) -> ("memoryBarrierCount" ::: Word32) -> ("pMemoryBarriers" ::: Ptr VkMemoryBarrier) -> ("bufferMemoryBarrierCount" ::: Word32) -> ("pBufferMemoryBarriers" ::: Ptr VkBufferMemoryBarrier) -> ("imageMemoryBarrierCount" ::: Word32) -> ("pImageMemoryBarriers" ::: Ptr VkImageMemoryBarrier) -> IO () Source #
vkCmdWaitEvents - Wait for one or more events and insert a set of memory
Parameters
commandBufferis the command buffer into which the command is recorded.
eventCountis the length of thepEventsarray.pEventsis an array of event object handles to wait on.srcStageMaskis a bitmask ofVkPipelineStageFlagBitsspecifying the source stage mask.dstStageMaskis a bitmask ofVkPipelineStageFlagBitsspecifying the destination stage mask.memoryBarrierCountis the length of thepMemoryBarriersarray.pMemoryBarriersis a pointer to an array ofVkMemoryBarrierstructures.bufferMemoryBarrierCountis the length of thepBufferMemoryBarriersarray.pBufferMemoryBarriersis a pointer to an array ofVkBufferMemoryBarrierstructures.imageMemoryBarrierCountis the length of thepImageMemoryBarriersarray.pImageMemoryBarriersis a pointer to an array ofVkImageMemoryBarrierstructures.
Description
When vkCmdWaitEvents is submitted to a queue, it defines a memory
dependency between prior event signal operations on the same queue or
the host, and subsequent commands. vkCmdWaitEvents must not be used
to wait on event signal operations occuring on other queues.
The first synchronization scope only includes event signal operations
that operate on members of pEvents, and the operations that
happened-before the event signal operations. Event signal operations
performed by vkCmdSetEvent that occur earlier in submission
order
are included in the first synchronization scope, if the logically
latest
pipeline stage in their stageMask parameter is logically
earlier
than or equal to the logically
latest
pipeline stage in srcStageMask. Event signal operations performed by
vkSetEvent are only included in the first
synchronization scope if VK_PIPELINE_STAGE_HOST_BIT is included in
srcStageMask.
The second synchronization
scope
includes all commands that occur later in submission
order.
The second synchronization scope is limited to operations on the
pipeline stages determined by the destination stage
mask
specified by dstStageMask.
The first access
scope
is limited to access in the pipeline stages determined by the source
stage
mask
specified by srcStageMask. Within that, the first access scope only
includes the first access scopes defined by elements of the
pMemoryBarriers, pBufferMemoryBarriers and pImageMemoryBarriers
arrays, which each define a set of memory
barriers.
If no memory barriers are specified, then the first access scope
includes no accesses.
The second access
scope
is limited to access in the pipeline stages determined by the
destination stage
mask
specified by dstStageMask. Within that, the second access scope only
includes the second access scopes defined by elements of the
pMemoryBarriers, pBufferMemoryBarriers and pImageMemoryBarriers
arrays, which each define a set of memory
barriers.
If no memory barriers are specified, then the second access scope
includes no accesses.
Note
vkCmdWaitEvents is used with vkCmdSetEvent to define a memory
dependency between two sets of action commands, roughly in the same way
as pipeline barriers, but split into two commands such that work between
the two may execute unhindered.
Note
Applications should be careful to avoid race conditions when using
events. There is no direct ordering guarantee between a
vkCmdResetEvent command and a vkCmdWaitEvents command submitted
after it, so some other execution dependency must be included between
these commands (e.g. a semaphore).
Valid Usage
srcStageMaskmust be the bitwise OR of thestageMaskparameter used in previous calls tovkCmdSetEventwith any of the members ofpEventsandVK_PIPELINE_STAGE_HOST_BITif any of the members ofpEventswas set usingvkSetEvent
- If the geometry
shaders
feature is not enabled,
srcStageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the geometry
shaders
feature is not enabled,
dstStageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the tessellation
shaders
feature is not enabled,
srcStageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If the tessellation
shaders
feature is not enabled,
dstStageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If
pEventsincludes one or more events that will be signaled byvkSetEventaftercommandBufferhas been submitted to a queue, thenvkCmdWaitEventsmust not be called inside a render pass instance - Any pipeline stage included in
srcStageMaskordstStageMaskmust be supported by the capabilities of the queue family specified by thequeueFamilyIndexmember of theVkCommandPoolCreateInfostructure that was used to create theVkCommandPoolthatcommandBufferwas allocated from, as specified in the table of supported pipeline stages. - Each element of
pMemoryBarriers,pBufferMemoryBarriersorpImageMemoryBarriersmust not have any access flag included in itssrcAccessMaskmember if that bit is not supported by any of the pipeline stages insrcStageMask, as specified in the table of supported access types. - Each element of
pMemoryBarriers,pBufferMemoryBarriersorpImageMemoryBarriersmust not have any access flag included in itsdstAccessMaskmember if that bit is not supported by any of the pipeline stages indstStageMask, as specified in the table of supported access types. commandBuffer’s current device mask must include exactly one physical device.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pEventsmust be a valid pointer to an array ofeventCountvalidVkEventhandlessrcStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluessrcStageMaskmust not be0dstStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluesdstStageMaskmust not be0- If
memoryBarrierCountis not0,pMemoryBarriersmust be a valid pointer to an array ofmemoryBarrierCountvalidVkMemoryBarrierstructures - If
bufferMemoryBarrierCountis not0,pBufferMemoryBarriersmust be a valid pointer to an array ofbufferMemoryBarrierCountvalidVkBufferMemoryBarrierstructures - If
imageMemoryBarrierCountis not0,pImageMemoryBarriersmust be a valid pointer to an array ofimageMemoryBarrierCountvalidVkImageMemoryBarrierstructures commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations eventCountmust be greater than0- Both of
commandBuffer, and the elements ofpEventsmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
VkBufferMemoryBarrier, VkCommandBuffer,
VkEvent, VkImageMemoryBarrier,
VkMemoryBarrier, VkPipelineStageFlags
vkCmdPipelineBarrier :: ("commandBuffer" ::: VkCommandBuffer) -> ("srcStageMask" ::: VkPipelineStageFlags) -> ("dstStageMask" ::: VkPipelineStageFlags) -> ("dependencyFlags" ::: VkDependencyFlags) -> ("memoryBarrierCount" ::: Word32) -> ("pMemoryBarriers" ::: Ptr VkMemoryBarrier) -> ("bufferMemoryBarrierCount" ::: Word32) -> ("pBufferMemoryBarriers" ::: Ptr VkBufferMemoryBarrier) -> ("imageMemoryBarrierCount" ::: Word32) -> ("pImageMemoryBarriers" ::: Ptr VkImageMemoryBarrier) -> IO () Source #
vkCmdPipelineBarrier - Insert a memory dependency
Parameters
commandBufferis the command buffer into which the command is recorded.
srcStageMaskis a bitmask ofVkPipelineStageFlagBitsspecifying the source stage mask.dstStageMaskis a bitmask ofVkPipelineStageFlagBitsspecifying the destination stage mask.dependencyFlagsis a bitmask ofVkDependencyFlagBitsspecifying how execution and memory dependencies are formed.memoryBarrierCountis the length of thepMemoryBarriersarray.pMemoryBarriersis a pointer to an array ofVkMemoryBarrierstructures.bufferMemoryBarrierCountis the length of thepBufferMemoryBarriersarray.pBufferMemoryBarriersis a pointer to an array ofVkBufferMemoryBarrierstructures.imageMemoryBarrierCountis the length of thepImageMemoryBarriersarray.pImageMemoryBarriersis a pointer to an array ofVkImageMemoryBarrierstructures.
Description
When vkCmdPipelineBarrier is submitted to a queue, it defines a memory
dependency between commands that were submitted before it, and those
submitted after it.
If vkCmdPipelineBarrier was recorded outside a render pass instance,
the first synchronization
scope
includes all commands that occur earlier in submission
order.
If vkCmdPipelineBarrier was recorded inside a render pass instance,
the first synchronization scope includes only commands that occur
earlier in submission
order
within the same subpass. In either case, the first synchronization scope
is limited to operations on the pipeline stages determined by the
source stage
mask
specified by srcStageMask.
If vkCmdPipelineBarrier was recorded outside a render pass instance,
the second synchronization
scope
includes all commands that occur later in submission
order.
If vkCmdPipelineBarrier was recorded inside a render pass instance,
the second synchronization scope includes only commands that occur later
in submission
order
within the same subpass. In either case, the second synchronization
scope is limited to operations on the pipeline stages determined by the
destination stage
mask
specified by dstStageMask.
The first access
scope
is limited to access in the pipeline stages determined by the source
stage
mask
specified by srcStageMask. Within that, the first access scope only
includes the first access scopes defined by elements of the
pMemoryBarriers, pBufferMemoryBarriers and pImageMemoryBarriers
arrays, which each define a set of memory
barriers.
If no memory barriers are specified, then the first access scope
includes no accesses.
The second access
scope
is limited to access in the pipeline stages determined by the
destination stage
mask
specified by dstStageMask. Within that, the second access scope only
includes the second access scopes defined by elements of the
pMemoryBarriers, pBufferMemoryBarriers and pImageMemoryBarriers
arrays, which each define a set of memory
barriers.
If no memory barriers are specified, then the second access scope
includes no accesses.
If dependencyFlags includes VK_DEPENDENCY_BY_REGION_BIT, then any
dependency between
framebuffer-space
pipeline stages is
framebuffer-local
- otherwise it is
framebuffer-global.
Valid Usage
- If the geometry
shaders
feature is not enabled,
srcStageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the geometry
shaders
feature is not enabled,
dstStageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the tessellation
shaders
feature is not enabled,
srcStageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If the tessellation
shaders
feature is not enabled,
dstStageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If
vkCmdPipelineBarrieris called within a render pass instance, the render pass must have been created with aVkSubpassDependencyinstance inpDependenciesthat expresses a dependency from the current subpass to itself. - If
vkCmdPipelineBarrieris called within a render pass instance,srcStageMaskmust contain a subset of the bit values in thesrcStageMaskmember of that instance ofVkSubpassDependency - If
vkCmdPipelineBarrieris called within a render pass instance,dstStageMaskmust contain a subset of the bit values in thedstStageMaskmember of that instance ofVkSubpassDependency - If
vkCmdPipelineBarrieris called within a render pass instance, thesrcAccessMaskof any element ofpMemoryBarriersorpImageMemoryBarriersmust contain a subset of the bit values thesrcAccessMaskmember of that instance ofVkSubpassDependency - If
vkCmdPipelineBarrieris called within a render pass instance, thedstAccessMaskof any element ofpMemoryBarriersorpImageMemoryBarriersmust contain a subset of the bit values thedstAccessMaskmember of that instance ofVkSubpassDependency - If
vkCmdPipelineBarrieris called within a render pass instance,dependencyFlagsmust be equal to thedependencyFlagsmember of that instance ofVkSubpassDependency - If
vkCmdPipelineBarrieris called within a render pass instance,bufferMemoryBarrierCountmust be0 - If
vkCmdPipelineBarrieris called within a render pass instance, theimagemember of any element ofpImageMemoryBarriersmust be equal to one of the elements ofpAttachmentsthat the currentframebufferwas created with, that is also referred to by one of the elements of thepColorAttachments,pResolveAttachmentsorpDepthStencilAttachmentmembers of theVkSubpassDescriptioninstance that the current subpass was created with - If
vkCmdPipelineBarrieris called within a render pass instance, theoldLayoutandnewLayoutmembers of any element ofpImageMemoryBarriersmust be equal to thelayoutmember of an element of thepColorAttachments,pResolveAttachmentsorpDepthStencilAttachmentmembers of theVkSubpassDescriptioninstance that the current subpass was created with, that refers to the sameimage - If
vkCmdPipelineBarrieris called within a render pass instance, theoldLayoutandnewLayoutmembers of an element ofpImageMemoryBarriersmust be equal - If
vkCmdPipelineBarrieris called within a render pass instance, thesrcQueueFamilyIndexanddstQueueFamilyIndexmembers of any element ofpImageMemoryBarriersmust beVK_QUEUE_FAMILY_IGNORED - Any pipeline stage included in
srcStageMaskordstStageMaskmust be supported by the capabilities of the queue family specified by thequeueFamilyIndexmember of theVkCommandPoolCreateInfostructure that was used to create theVkCommandPoolthatcommandBufferwas allocated from, as specified in the table of supported pipeline stages. - Each element of
pMemoryBarriers,pBufferMemoryBarriersandpImageMemoryBarriersmust not have any access flag included in itssrcAccessMaskmember if that bit is not supported by any of the pipeline stages insrcStageMask, as specified in the table of supported access types. - Each element of
pMemoryBarriers,pBufferMemoryBarriersandpImageMemoryBarriersmust not have any access flag included in itsdstAccessMaskmember if that bit is not supported by any of the pipeline stages indstStageMask, as specified in the table of supported access types. - If
vkCmdPipelineBarrieris called outside of a render pass instance,dependencyFlagsmust not includeVK_DEPENDENCY_VIEW_LOCAL_BIT
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
srcStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluessrcStageMaskmust not be0dstStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluesdstStageMaskmust not be0dependencyFlagsmust be a valid combination ofVkDependencyFlagBitsvalues- If
memoryBarrierCountis not0,pMemoryBarriersmust be a valid pointer to an array ofmemoryBarrierCountvalidVkMemoryBarrierstructures - If
bufferMemoryBarrierCountis not0,pBufferMemoryBarriersmust be a valid pointer to an array ofbufferMemoryBarrierCountvalidVkBufferMemoryBarrierstructures - If
imageMemoryBarrierCountis not0,pImageMemoryBarriersmust be a valid pointer to an array ofimageMemoryBarrierCountvalidVkImageMemoryBarrierstructures commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Transfer Graphics Compute |
See Also
VkBufferMemoryBarrier, VkCommandBuffer,
VkDependencyFlags, VkImageMemoryBarrier,
VkMemoryBarrier, VkPipelineStageFlags
vkCmdBeginQuery :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("query" ::: Word32) -> ("flags" ::: VkQueryControlFlags) -> IO () Source #
vkCmdBeginQuery - Begin a query
Parameters
commandBufferis the command buffer into which this command will be recorded.
queryPoolis the query pool that will manage the results of the query.queryis the query index within the query pool that will contain the results.flagsis a bitmask ofVkQueryControlFlagBitsspecifying constraints on the types of queries that can be performed.
Description
If the queryType of the pool is VK_QUERY_TYPE_OCCLUSION and flags
contains VK_QUERY_CONTROL_PRECISE_BIT, an implementation must return
a result that matches the actual number of samples passed. This is
described in more detail in Occlusion
Queries.
After beginning a query, that query is considered active within the command buffer it was called in until that same query is ended. Queries active in a primary command buffer when secondary command buffers are executed are considered active for those secondary command buffers.
Valid Usage
queryPoolmust have been created with aqueryTypethat differs from that of any queries that are active withincommandBuffer
- All queries used by the command must be unavailable
- If the precise occlusion
queries
feature is not enabled, or the
queryTypeused to createqueryPoolwas notVK_QUERY_TYPE_OCCLUSION,flagsmust not containVK_QUERY_CONTROL_PRECISE_BIT querymust be less than the number of queries inqueryPool- If the
queryTypeused to createqueryPoolwasVK_QUERY_TYPE_OCCLUSION, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasVK_QUERY_TYPE_PIPELINE_STATISTICSand any of thepipelineStatisticsindicate graphics operations, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasVK_QUERY_TYPE_PIPELINE_STATISTICSand any of thepipelineStatisticsindicate compute operations, theVkCommandPoolthatcommandBufferwas allocated from must support compute operations - If
vkCmdBeginQueryis called within a render pass instance, the sum ofqueryand the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
queryPoolmust be a validVkQueryPoolhandleflagsmust be a valid combination ofVkQueryControlFlagBitsvaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
vkCmdEndQuery :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("query" ::: Word32) -> IO () Source #
vkCmdEndQuery - Ends a query
Parameters
commandBufferis the command buffer into which this command will be recorded.
queryPoolis the query pool that is managing the results of the query.queryis the query index within the query pool where the result is stored.
Description
As queries operate asynchronously, ending a query does not immediately
set the query’s status to available. A query is considered finished
when the final results of the query are ready to be retrieved by
vkGetQueryPoolResults and
vkCmdCopyQueryPoolResults, and this is when the query’s status is set
to available.
Once a query is ended the query must finish in finite time, unless the state of the query is changed using other commands, e.g. by issuing a reset of the query.
Valid Usage
- All queries used by the command must be active
querymust be less than the number of queries inqueryPool- If
vkCmdEndQueryis called within a render pass instance, the sum ofqueryand the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
queryPoolmust be a validVkQueryPoolhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
vkCmdResetQueryPool :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> IO () Source #
vkCmdResetQueryPool - Reset queries in a query pool
Parameters
commandBufferis the command buffer into which this command will be recorded.
queryPoolis the handle of the query pool managing the queries being reset.firstQueryis the initial query index to reset.queryCountis the number of queries to reset.
Description
When executed on a queue, this command sets the status of query indices
[firstQuery, firstQuery + queryCount - 1] to unavailable.
Valid Usage
firstQuerymust be less than the number of queries inqueryPool
- The sum of
firstQueryandqueryCountmust be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
queryPoolmust be a validVkQueryPoolhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics Compute |
See Also
vkCmdWriteTimestamp :: ("commandBuffer" ::: VkCommandBuffer) -> ("pipelineStage" ::: VkPipelineStageFlagBits) -> ("queryPool" ::: VkQueryPool) -> ("query" ::: Word32) -> IO () Source #
vkCmdWriteTimestamp - Write a device timestamp into a query object
Parameters
commandBufferis the command buffer into which the command will be recorded.
pipelineStageis one of theVkPipelineStageFlagBits, specifying a stage of the pipeline.queryPoolis the query pool that will manage the timestamp.queryis the query within the query pool that will contain the timestamp.
Description
vkCmdWriteTimestamp latches the value of the timer when all previous
commands have completed executing as far as the specified pipeline
stage, and writes the timestamp value to memory. When the timestamp
value is written, the availability status of the query is set to
available.
Note
If an implementation is unable to detect completion and latch the timer at any specific stage of the pipeline, it may instead do so at any logically later stage.
vkCmdCopyQueryPoolResults can then be called to copy the timestamp
value from the query pool into buffer memory, with ordering and
synchronization behavior equivalent to how other queries operate.
Timestamp values can also be retrieved from the query pool using
vkGetQueryPoolResults. As with other
queries, the query must be reset using vkCmdResetQueryPool before
requesting the timestamp value be written to it.
While vkCmdWriteTimestamp can be called inside or outside of a
render pass instance, vkCmdCopyQueryPoolResults must only be called
outside of a render pass instance.
Timestamps may only be meaningfully compared if they are written by commands submitted to the same queue.
Note
An example of such a comparison is determining the execution time of a sequence of commands.
If vkCmdWriteTimestamp is called while executing a render pass
instance that has multiview enabled, the timestamp uses N consecutive
query indices in the query pool (starting at query) where N is the
number of bits set in the view mask of the subpass the command is
executed in. The resulting query values are determined by an
implementation-dependent choice of one of the following behaviors:
- The first query is a timestamp value and (if more than one bit is set in the view mask) zero is written to the remaining queries. If two timestamps are written in the same subpass, the sum of the execution time of all views between those commands is the difference between the first query written by each command.
- All N queries are timestamp values. If two timestamps are written in the same subpass, the sum of the execution time of all views between those commands is the sum of the difference between corresponding queries written by each command. The difference between corresponding queries may be the execution time of a single view.
In either case, the application can sum the differences between all N queries to determine the total execution time.
Valid Usage
queryPoolmust have been created with aqueryTypeofVK_QUERY_TYPE_TIMESTAMP
- The query identified by
queryPoolandquerymust be unavailable - The command pool’s queue family must support a non-zero
timestampValidBits - All queries used by the command must be unavailable
- If
vkCmdWriteTimestampis called within a render pass instance, the sum ofqueryand the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pipelineStagemust be a validVkPipelineStageFlagBitsvaluequeryPoolmust be a validVkQueryPoolhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Transfer Graphics Compute | Transfer |
See Also
vkCmdCopyQueryPoolResults :: ("commandBuffer" ::: VkCommandBuffer) -> ("queryPool" ::: VkQueryPool) -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dstBuffer" ::: VkBuffer) -> ("dstOffset" ::: VkDeviceSize) -> ("stride" ::: VkDeviceSize) -> ("flags" ::: VkQueryResultFlags) -> IO () Source #
vkCmdCopyQueryPoolResults - Copy the results of queries in a query pool to a buffer object
Parameters
commandBufferis the command buffer into which this command will be recorded.
queryPoolis the query pool managing the queries containing the desired results.firstQueryis the initial query index.queryCountis the number of queries.firstQueryandqueryCounttogether define a range of queries.dstBufferis aVkBufferobject that will receive the results of the copy command.dstOffsetis an offset intodstBuffer.strideis the stride in bytes between results for individual queries withindstBuffer. The required size of the backing memory fordstBufferis determined as described above forvkGetQueryPoolResults.flagsis a bitmask ofVkQueryResultFlagBitsspecifying how and when results are returned.
Description
vkCmdCopyQueryPoolResults is guaranteed to see the effect of previous
uses of vkCmdResetQueryPool in the same queue, without any additional
synchronization. Thus, the results will always reflect the most recent
use of the query.
flags has the same possible values described above for the flags
parameter of vkGetQueryPoolResults, but
the different style of execution causes some subtle behavioral
differences. Because vkCmdCopyQueryPoolResults executes in order with
respect to other query commands, there is less ambiguity about which use
of a query is being requested.
If no bits are set in flags, results for all requested queries in the
available state are written as 32-bit unsigned integer values, and
nothing is written for queries in the unavailable state.
If VK_QUERY_RESULT_64_BIT is set, the results are written as an array
of 64-bit unsigned integer values as described for
vkGetQueryPoolResults.
If VK_QUERY_RESULT_WAIT_BIT is set, the implementation will wait for
each query’s status to be in the available state before retrieving the
numerical results for that query. This is guaranteed to reflect the most
recent use of the query on the same queue, assuming that the query is
not being simultaneously used by other queues. If the query does not
become available in a finite amount of time (e.g. due to not issuing a
query since the last reset), a VK_ERROR_DEVICE_LOST error may occur.
Similarly, if VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set and
VK_QUERY_RESULT_WAIT_BIT is not set, the availability is guaranteed to
reflect the most recent use of the query on the same queue, assuming
that the query is not being simultaneously used by other queues. As with
vkGetQueryPoolResults, implementations must guarantee that if they
return a non-zero availability value, then the numerical results are
valid.
If VK_QUERY_RESULT_PARTIAL_BIT is set, VK_QUERY_RESULT_WAIT_BIT is
not set, and the query’s status is unavailable, an intermediate result
value between zero and the final result value is written for that query.
VK_QUERY_RESULT_PARTIAL_BIT must not be used if the pool’s
queryType is VK_QUERY_TYPE_TIMESTAMP.
vkCmdCopyQueryPoolResults is considered to be a transfer operation,
and its writes to buffer memory must be synchronized using
VK_PIPELINE_STAGE_TRANSFER_BIT and VK_ACCESS_TRANSFER_WRITE_BIT
before using the results.
Valid Usage
dstOffsetmust be less than the size ofdstBuffer
firstQuerymust be less than the number of queries inqueryPool- The sum of
firstQueryandqueryCountmust be less than or equal to the number of queries inqueryPool - If
VK_QUERY_RESULT_64_BITis not set inflagsthendstOffsetandstridemust be multiples of4 - If
VK_QUERY_RESULT_64_BITis set inflagsthendstOffsetandstridemust be multiples of8 dstBuffermust have enough storage, fromdstOffset, to contain the result of each query, as described heredstBuffermust have been created withVK_BUFFER_USAGE_TRANSFER_DST_BITusage flag- If
dstBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - If the
queryTypeused to createqueryPoolwasVK_QUERY_TYPE_TIMESTAMP,flagsmust not containVK_QUERY_RESULT_PARTIAL_BIT
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
queryPoolmust be a validVkQueryPoolhandledstBuffermust be a validVkBufferhandleflagsmust be a valid combination ofVkQueryResultFlagBitsvaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Each of
commandBuffer,dstBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Outside | Graphics Compute | Transfer |
See Also
VkBuffer,
VkCommandBuffer, VkDeviceSize,
VkQueryPool,
VkQueryResultFlags
vkCmdPushConstants :: ("commandBuffer" ::: VkCommandBuffer) -> ("layout" ::: VkPipelineLayout) -> ("stageFlags" ::: VkShaderStageFlags) -> ("offset" ::: Word32) -> ("size" ::: Word32) -> ("pValues" ::: Ptr ()) -> IO () Source #
vkCmdPushConstants - Update the values of push constants
Parameters
commandBufferis the command buffer in which the push constant update will be recorded.
layoutis the pipeline layout used to program the push constant updates.stageFlagsis a bitmask ofVkShaderStageFlagBitsspecifying the shader stages that will use the push constants in the updated range.offsetis the start offset of the push constant range to update, in units of bytes.sizeis the size of the push constant range to update, in units of bytes.pValuesis an array ofsizebytes containing the new push constant values.
Valid Usage
- For each byte in the range specified by
offsetandsizeand for each shader stage instageFlags, there must be a push constant range inlayoutthat includes that byte and that stage
- For each byte in the range specified by
offsetandsizeand for each push constant range that overlaps that byte,stageFlagsmust include all stages in that push constant range’sVkPushConstantRange::stageFlags offsetmust be a multiple of4sizemust be a multiple of4offsetmust be less thanVkPhysicalDeviceLimits::maxPushConstantsSizesizemust be less than or equal toVkPhysicalDeviceLimits::maxPushConstantsSizeminusoffset
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
layoutmust be a validVkPipelineLayouthandlestageFlagsmust be a valid combination ofVkShaderStageFlagBitsvaluesstageFlagsmust not be0pValuesmust be a valid pointer to an array ofsizebytescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations sizemust be greater than0- Both of
commandBuffer, andlayoutmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
vkCmdBeginRenderPass :: ("commandBuffer" ::: VkCommandBuffer) -> ("pRenderPassBegin" ::: Ptr VkRenderPassBeginInfo) -> ("contents" ::: VkSubpassContents) -> IO () Source #
vkCmdBeginRenderPass - Begin a new render pass
Parameters
commandBufferis the command buffer in which to record the command.
pRenderPassBeginis a pointer to aVkRenderPassBeginInfostructure (defined below) which specifies the render pass to begin an instance of, and the framebuffer the instance uses.contentsis aVkSubpassContentsvalue specifying how the commands in the first subpass will be provided.
Description
After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.
Valid Usage
- If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisVK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALthen the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created withVK_IMAGE_USAGE_COLOR_ATTACHMENT_BITset
- If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, orVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALthen the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created withVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITset - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisVK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALthen the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created withVK_IMAGE_USAGE_SAMPLED_BITorVK_IMAGE_USAGE_INPUT_ATTACHMENT_BITset - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisVK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMALthen the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created withVK_IMAGE_USAGE_TRANSFER_SRC_BITset - If any of the
initialLayoutorfinalLayoutmember of theVkAttachmentDescriptionstructures or thelayoutmember of theVkAttachmentReferencestructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginisVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMALthen the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBeginmust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITset - If any of the
initialLayoutmembers of theVkAttachmentDescriptionstructures specified when creating the render pass specified in therenderPassmember ofpRenderPassBeginis notVK_IMAGE_LAYOUT_UNDEFINED, then each suchinitialLayoutmust be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in theframebuffermember ofpRenderPassBegin - The
srcStageMaskanddstStageMaskmembers of any element of thepDependenciesmember ofVkRenderPassCreateInfoused to createrenderPassmust be supported by the capabilities of the queue family identified by thequeueFamilyIndexmember of theVkCommandPoolCreateInfoused to create the command pool whichcommandBufferwas allocated from.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pRenderPassBeginmust be a valid pointer to a validVkRenderPassBeginInfostructurecontentsmust be a validVkSubpassContentsvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called outside of a render pass instance
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Outside | Graphics | Graphics |
See Also
vkCmdNextSubpass :: ("commandBuffer" ::: VkCommandBuffer) -> ("contents" ::: VkSubpassContents) -> IO () Source #
vkCmdNextSubpass - Transition to the next subpass of a render pass
Parameters
commandBufferis the command buffer in which to record the command.
contentsspecifies how the commands in the next subpass will be provided, in the same fashion as the corresponding parameter ofvkCmdBeginRenderPass.
Description
The subpass index for a render pass begins at zero when
vkCmdBeginRenderPass is recorded, and increments each time
vkCmdNextSubpass is recorded.
Moving to the next subpass automatically performs any multisample
resolve operations in the subpass being ended. End-of-subpass
multisample resolves are treated as color attachment writes for the
purposes of synchronization. That is, they are considered to execute in
the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage and
their writes are synchronized with
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT. Synchronization between
rendering within a subpass and any resolve operations at the end of the
subpass occurs automatically, without need for explicit dependencies or
pipeline barriers. However, if the resolve attachment is also used in a
different subpass, an explicit dependency is needed.
After transitioning to the next subpass, the application can record the commands for that subpass.
Valid Usage
- The current subpass index must be less than the number of subpasses in the render pass minus one
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
contentsmust be a validVkSubpassContentsvaluecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Inside | Graphics | Graphics |
See Also
vkCmdEndRenderPass :: ("commandBuffer" ::: VkCommandBuffer) -> IO () Source #
vkCmdEndRenderPass - End the current render pass
Parameters
commandBufferis the command buffer in which to end the current render pass instance.
Description
Ending a render pass instance performs any multisample resolve operations on the final subpass.
Valid Usage
- The current subpass index must be equal to the number of subpasses in the render pass minus one
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffermust be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Inside | Graphics | Graphics |
See Also
vkCmdExecuteCommands :: ("commandBuffer" ::: VkCommandBuffer) -> ("commandBufferCount" ::: Word32) -> ("pCommandBuffers" ::: Ptr VkCommandBuffer) -> IO () Source #
vkCmdExecuteCommands - Execute a secondary command buffer from a primary command buffer
Parameters
commandBufferis a handle to a primary command buffer that the secondary command buffers are executed in.
commandBufferCountis the length of thepCommandBuffersarray.pCommandBuffersis an array of secondary command buffer handles, which are recorded to execute in the primary command buffer in the order they are listed in the array.
Description
If any element of pCommandBuffers was not recorded with the
VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT flag, and it was recorded
into any other primary command buffer which is currently in the
executable or recording
state,
that primary command buffer becomes
invalid.
Valid Usage
commandBuffermust have been allocated with alevelofVK_COMMAND_BUFFER_LEVEL_PRIMARY
- Each element of
pCommandBuffersmust have been allocated with alevelofVK_COMMAND_BUFFER_LEVEL_SECONDARY - Each element of
pCommandBuffersmust be in the pending or executable state. - If any element of
pCommandBufferswas not recorded with theVK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BITflag, and it was recorded into any other primary command buffer, that primary command buffer must not be in the pending state - If any element of
pCommandBufferswas not recorded with theVK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BITflag, it must not be in the pending state. - If any element of
pCommandBufferswas not recorded with theVK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BITflag, it must not have already been recorded tocommandBuffer. - If any element of
pCommandBufferswas not recorded with theVK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BITflag, it must not appear more than once inpCommandBuffers. - Each element of
pCommandBuffersmust have been allocated from aVkCommandPoolthat was created for the same queue family as theVkCommandPoolfrom whichcommandBufferwas allocated - If
vkCmdExecuteCommandsis being called within a render pass instance, that render pass instance must have been begun with thecontentsparameter ofvkCmdBeginRenderPassset toVK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS - If
vkCmdExecuteCommandsis being called within a render pass instance, each element ofpCommandBuffersmust have been recorded with theVK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT - If
vkCmdExecuteCommandsis being called within a render pass instance, each element ofpCommandBuffersmust have been recorded withVkCommandBufferInheritanceInfo::subpassset to the index of the subpass which the given command buffer will be executed in - If
vkCmdExecuteCommandsis being called within a render pass instance, the render passes specified in the pname::pBeginInfo::pInheritanceInfo::renderPassmembers of thevkBeginCommandBuffercommands used to begin recording each element ofpCommandBuffersmust be compatible with the current render pass. - If
vkCmdExecuteCommandsis being called within a render pass instance, and any element ofpCommandBufferswas recorded withVkCommandBufferInheritanceInfo::framebuffernot equal toVK_NULL_HANDLE, thatVkFramebuffermust match theVkFramebufferused in the current render pass instance - If
vkCmdExecuteCommandsis not being called within a render pass instance, each element ofpCommandBuffersmust not have been recorded with theVK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT - If the inherited
queries
feature is not enabled,
commandBuffermust not have any queries active - If
commandBufferhas aVK_QUERY_TYPE_OCCLUSIONquery active, then each element ofpCommandBuffersmust have been recorded withVkCommandBufferInheritanceInfo::occlusionQueryEnableset toVK_TRUE - If
commandBufferhas aVK_QUERY_TYPE_OCCLUSIONquery active, then each element ofpCommandBuffersmust have been recorded withVkCommandBufferInheritanceInfo::queryFlagshaving all bits set that are set for the query - If
commandBufferhas aVK_QUERY_TYPE_PIPELINE_STATISTICSquery active, then each element ofpCommandBuffersmust have been recorded withVkCommandBufferInheritanceInfo::pipelineStatisticshaving all bits set that are set in theVkQueryPoolthe query uses - Each element of
pCommandBuffersmust not begin any query types that are active incommandBuffer
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle
pCommandBuffersmust be a valid pointer to an array ofcommandBufferCountvalidVkCommandBufferhandlescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support transfer, graphics, or compute operations commandBuffermust be a primaryVkCommandBuffercommandBufferCountmust be greater than0- Both of
commandBuffer, and the elements ofpCommandBuffersmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary | Both | Transfer Graphics Compute |
See Also
data VkClearRect Source #
VkClearRect - Structure specifying a clear rectangle
Description
The layers [baseArrayLayer, baseArrayLayer + layerCount) counting
from the base layer of the attachment image view are cleared.
See Also
Constructors
| VkClearRect | |
Fields
| |
Instances
| Eq VkClearRect Source # | |
| Show VkClearRect Source # | |
Methods showsPrec :: Int -> VkClearRect -> ShowS # show :: VkClearRect -> String # showList :: [VkClearRect] -> ShowS # | |
| Storable VkClearRect Source # | |
Methods sizeOf :: VkClearRect -> Int # alignment :: VkClearRect -> Int # peekElemOff :: Ptr VkClearRect -> Int -> IO VkClearRect # pokeElemOff :: Ptr VkClearRect -> Int -> VkClearRect -> IO () # peekByteOff :: Ptr b -> Int -> IO VkClearRect # pokeByteOff :: Ptr b -> Int -> VkClearRect -> IO () # peek :: Ptr VkClearRect -> IO VkClearRect # poke :: Ptr VkClearRect -> VkClearRect -> IO () # | |
data VkImageSubresourceLayers Source #
VkImageSubresourceLayers - Structure specifying a image subresource layers
Valid Usage
- If
aspectMaskcontainsVK_IMAGE_ASPECT_COLOR_BIT, it must not contain either ofVK_IMAGE_ASPECT_DEPTH_BITorVK_IMAGE_ASPECT_STENCIL_BIT
aspectMaskmust not containVK_IMAGE_ASPECT_METADATA_BITlayerCountmust be greater than 0
Valid Usage (Implicit)
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvalues
aspectMaskmust not be0
See Also
VkBufferImageCopy,
VkImageAspectFlags,
VkImageBlit, VkImageCopy, VkImageResolve
Constructors
| VkImageSubresourceLayers | |
Fields
| |
Instances
| Eq VkImageSubresourceLayers Source # | |
Methods (==) :: VkImageSubresourceLayers -> VkImageSubresourceLayers -> Bool # (/=) :: VkImageSubresourceLayers -> VkImageSubresourceLayers -> Bool # | |
| Show VkImageSubresourceLayers Source # | |
Methods showsPrec :: Int -> VkImageSubresourceLayers -> ShowS # show :: VkImageSubresourceLayers -> String # showList :: [VkImageSubresourceLayers] -> ShowS # | |
| Storable VkImageSubresourceLayers Source # | |
Methods sizeOf :: VkImageSubresourceLayers -> Int # alignment :: VkImageSubresourceLayers -> Int # peekElemOff :: Ptr VkImageSubresourceLayers -> Int -> IO VkImageSubresourceLayers # pokeElemOff :: Ptr VkImageSubresourceLayers -> Int -> VkImageSubresourceLayers -> IO () # peekByteOff :: Ptr b -> Int -> IO VkImageSubresourceLayers # pokeByteOff :: Ptr b -> Int -> VkImageSubresourceLayers -> IO () # peek :: Ptr VkImageSubresourceLayers -> IO VkImageSubresourceLayers # poke :: Ptr VkImageSubresourceLayers -> VkImageSubresourceLayers -> IO () # | |
data VkMemoryBarrier Source #
VkMemoryBarrier - Structure specifying a global memory barrier
Description
The first access
scope
is limited to access types in the source access
mask
specified by srcAccessMask.
The second access
scope
is limited to access types in the destination access
mask
specified by dstAccessMask.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_MEMORY_BARRIER
pNextmust beNULLsrcAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdstAccessMaskmust be a valid combination ofVkAccessFlagBitsvalues
See Also
VkAccessFlags,
VkStructureType, vkCmdPipelineBarrier,
vkCmdWaitEvents
Constructors
| VkMemoryBarrier | |
Fields
| |
Instances
| Eq VkMemoryBarrier Source # | |
Methods (==) :: VkMemoryBarrier -> VkMemoryBarrier -> Bool # (/=) :: VkMemoryBarrier -> VkMemoryBarrier -> Bool # | |
| Show VkMemoryBarrier Source # | |
Methods showsPrec :: Int -> VkMemoryBarrier -> ShowS # show :: VkMemoryBarrier -> String # showList :: [VkMemoryBarrier] -> ShowS # | |
| Storable VkMemoryBarrier Source # | |
Methods sizeOf :: VkMemoryBarrier -> Int # alignment :: VkMemoryBarrier -> Int # peekElemOff :: Ptr VkMemoryBarrier -> Int -> IO VkMemoryBarrier # pokeElemOff :: Ptr VkMemoryBarrier -> Int -> VkMemoryBarrier -> IO () # peekByteOff :: Ptr b -> Int -> IO VkMemoryBarrier # pokeByteOff :: Ptr b -> Int -> VkMemoryBarrier -> IO () # peek :: Ptr VkMemoryBarrier -> IO VkMemoryBarrier # poke :: Ptr VkMemoryBarrier -> VkMemoryBarrier -> IO () # | |
data VkBufferMemoryBarrier Source #
VkBufferMemoryBarrier - Structure specifying a buffer memory barrier
Description
The first access
scope
is limited to access to memory through the specified buffer range, via
access types in the source access
mask
specified by srcAccessMask. If srcAccessMask includes
VK_ACCESS_HOST_WRITE_BIT, memory writes performed by that access type
are also made visible, as that access type is not performed through a
resource.
The second access
scope
is limited to access to memory through the specified buffer range, via
access types in the destination access
mask.
specified by dstAccessMask. If dstAccessMask includes
VK_ACCESS_HOST_WRITE_BIT or VK_ACCESS_HOST_READ_BIT, available
memory writes are also made visible to accesses of those types, as those
access types are not performed through a resource.
If srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, and
srcQueueFamilyIndex is equal to the current queue family, then the
memory barrier defines a queue family release
operation
for the specified buffer range, and the second access scope includes no
access, as if dstAccessMask was 0.
If dstQueueFamilyIndex is not equal to srcQueueFamilyIndex, and
dstQueueFamilyIndex is equal to the current queue family, then the
memory barrier defines a queue family acquire
operation
for the specified buffer range, and the first access scope includes no
access, as if srcAccessMask was 0.
Valid Usage
offsetmust be less than the size ofbuffer
- If
sizeis not equal toVK_WHOLE_SIZE,sizemust be greater than0 - If
sizeis not equal toVK_WHOLE_SIZE,sizemust be less than or equal to than the size ofbufferminusoffset - If
bufferwas created with a sharing mode ofVK_SHARING_MODE_CONCURRENT, at least one ofsrcQueueFamilyIndexanddstQueueFamilyIndexmust beVK_QUEUE_FAMILY_IGNORED - If
bufferwas created with a sharing mode ofVK_SHARING_MODE_CONCURRENT, and one ofsrcQueueFamilyIndexanddstQueueFamilyIndexisVK_QUEUE_FAMILY_IGNORED, the other must beVK_QUEUE_FAMILY_IGNOREDor a special queue family reserved for external memory ownership transfers, as described in {html_spec_relative}#synchronization-queue-transfers. - If
bufferwas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVEandsrcQueueFamilyIndexisVK_QUEUE_FAMILY_IGNORED,dstQueueFamilyIndexmust also beVK_QUEUE_FAMILY_IGNORED - If
bufferwas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVEandsrcQueueFamilyIndexis notVK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in {html_spec_relative}#synchronization-queue-transfers. - If
bufferwas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVEanddstQueueFamilyIndexis notVK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in {html_spec_relative}#synchronization-queue-transfers. - If
bufferwas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVE, andsrcQueueFamilyIndexanddstQueueFamilyIndexare notVK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
pNextmust beNULLsrcAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdstAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesbuffermust be a validVkBufferhandle
See Also
VkAccessFlags,
VkBuffer, VkDeviceSize,
VkStructureType, vkCmdPipelineBarrier,
vkCmdWaitEvents
Constructors
| VkBufferMemoryBarrier | |
Fields
| |
Instances
| Eq VkBufferMemoryBarrier Source # | |
Methods (==) :: VkBufferMemoryBarrier -> VkBufferMemoryBarrier -> Bool # (/=) :: VkBufferMemoryBarrier -> VkBufferMemoryBarrier -> Bool # | |
| Show VkBufferMemoryBarrier Source # | |
Methods showsPrec :: Int -> VkBufferMemoryBarrier -> ShowS # show :: VkBufferMemoryBarrier -> String # showList :: [VkBufferMemoryBarrier] -> ShowS # | |
| Storable VkBufferMemoryBarrier Source # | |
Methods sizeOf :: VkBufferMemoryBarrier -> Int # alignment :: VkBufferMemoryBarrier -> Int # peekElemOff :: Ptr VkBufferMemoryBarrier -> Int -> IO VkBufferMemoryBarrier # pokeElemOff :: Ptr VkBufferMemoryBarrier -> Int -> VkBufferMemoryBarrier -> IO () # peekByteOff :: Ptr b -> Int -> IO VkBufferMemoryBarrier # pokeByteOff :: Ptr b -> Int -> VkBufferMemoryBarrier -> IO () # peek :: Ptr VkBufferMemoryBarrier -> IO VkBufferMemoryBarrier # poke :: Ptr VkBufferMemoryBarrier -> VkBufferMemoryBarrier -> IO () # | |
data VkImageMemoryBarrier Source #
VkImageMemoryBarrier - Structure specifying the parameters of an image memory barrier
Description
The first access
scope
is limited to access to memory through the specified image subresource
range, via access types in the source access
mask
specified by srcAccessMask. If srcAccessMask includes
VK_ACCESS_HOST_WRITE_BIT, memory writes performed by that access type
are also made visible, as that access type is not performed through a
resource.
The second access
scope
is limited to access to memory through the specified image subresource
range, via access types in the destination access
mask
specified by dstAccessMask. If dstAccessMask includes
VK_ACCESS_HOST_WRITE_BIT or VK_ACCESS_HOST_READ_BIT, available
memory writes are also made visible to accesses of those types, as those
access types are not performed through a resource.
If srcQueueFamilyIndex is not equal to dstQueueFamilyIndex, and
srcQueueFamilyIndex is equal to the current queue family, then the
memory barrier defines a queue family release
operation
for the specified image subresource range, and the second access scope
includes no access, as if dstAccessMask was 0.
If dstQueueFamilyIndex is not equal to srcQueueFamilyIndex, and
dstQueueFamilyIndex is equal to the current queue family, then the
memory barrier defines a queue family acquire
operation
for the specified image subresource range, and the first access scope
includes no access, as if srcAccessMask was 0.
If oldLayout is not equal to newLayout, then the memory barrier
defines an image layout
transition
for the specified image subresource range.
Layout transitions that are performed via image memory barriers execute in their entirety in submission order, relative to other image layout transitions submitted to the same queue, including those performed by render passes. In effect there is an implicit execution dependency from each such layout transition to all layout transitions previously submitted to the same queue.
The image layout of each image subresource of a depth/stencil image
created with VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
is dependent on the last sample locations used to render to the image
subresource as a depth/stencil attachment, thus when the image member
of an VkImageMemoryBarrier is an image created with this flag the
application can chain a
VkSampleLocationsInfoEXT
structure to the pNext chain of VkImageMemoryBarrier to specify the
sample locations to use during the image layout transition.
If the VkSampleLocationsInfoEXT structure in the pNext chain of
VkImageMemoryBarrier does not match the sample location state last
used to render to the image subresource range specified by
subresourceRange or if no VkSampleLocationsInfoEXT structure is in
the pNext chain of VkImageMemoryBarrier then the contents of the
given image subresource range becomes undefined as if oldLayout would
equal VK_IMAGE_LAYOUT_UNDEFINED.
If image has a multi-planar format and the image is disjoint, then
including VK_IMAGE_ASPECT_COLOR_BIT in the aspectMask member of
subresourceRange is equivalent to including
VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT, and (for
three-plane formats only) VK_IMAGE_ASPECT_PLANE_2_BIT.
Valid Usage
oldLayoutmust beVK_IMAGE_LAYOUT_UNDEFINEDor the current layout of the image subresources affected by the barrier
newLayoutmust not beVK_IMAGE_LAYOUT_UNDEFINEDorVK_IMAGE_LAYOUT_PREINITIALIZED- If
imagewas created with a sharing mode ofVK_SHARING_MODE_CONCURRENT, at least one ofsrcQueueFamilyIndexanddstQueueFamilyIndexmust beVK_QUEUE_FAMILY_IGNORED - If
imagewas created with a sharing mode ofVK_SHARING_MODE_CONCURRENT, and one ofsrcQueueFamilyIndexanddstQueueFamilyIndexisVK_QUEUE_FAMILY_IGNORED, the other must beVK_QUEUE_FAMILY_IGNOREDor a special queue family reserved for external memory transfers, as described in {html_spec_relative}#synchronization-queue-transfers. - If
imagewas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVEandsrcQueueFamilyIndexisVK_QUEUE_FAMILY_IGNORED,dstQueueFamilyIndexmust also beVK_QUEUE_FAMILY_IGNORED. - If
imagewas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVEandsrcQueueFamilyIndexis notVK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in {html_spec_relative}#synchronization-queue-transfers. - If
imagewas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVEanddstQueueFamilyIndexis notVK_QUEUE_FAMILY_IGNORED, it must be a valid queue family or a special queue family reserved for external memory transfers, as described in {html_spec_relative}#synchronization-queue-transfers. - If
imagewas created with a sharing mode ofVK_SHARING_MODE_EXCLUSIVE, andsrcQueueFamilyIndexanddstQueueFamilyIndexare notVK_QUEUE_FAMILY_IGNORED, at least one of them must be the same as the family of the queue that will execute this barrier subresourceRange.baseMipLevelmust be less than themipLevelsspecified inVkImageCreateInfowhenimagewas created- If
subresourceRange.levelCountis notVK_REMAINING_MIP_LEVELS,subresourceRange.baseMipLevel+subresourceRange.levelCountmust be less than or equal to themipLevelsspecified inVkImageCreateInfowhenimagewas created subresourceRange.baseArrayLayermust be less than thearrayLayersspecified inVkImageCreateInfowhenimagewas created- If
subresourceRange.layerCountis notVK_REMAINING_ARRAY_LAYERS,subresourceRange.baseArrayLayer+subresourceRange.layerCountmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhenimagewas created - If
imagehas a depth/stencil format with both depth and stencil components, then theaspectMaskmember ofsubresourceRangemust include bothVK_IMAGE_ASPECT_DEPTH_BITandVK_IMAGE_ASPECT_STENCIL_BIT - If
imagehas a single-plane color format or is not disjoint, then theaspectMaskmember ofsubresourceRangemust beVK_IMAGE_ASPECT_COLOR_BIT - If
imagehas a multi-planar format and the image is disjoint, then theaspectMaskmember ofsubresourceRangemust include either at least one ofVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, andVK_IMAGE_ASPECT_PLANE_2_BIT; or must includeVK_IMAGE_ASPECT_COLOR_BIT - If
imagehas a multi-planar format with only two planes, then theaspectMaskmember ofsubresourceRangemust not includeVK_IMAGE_ASPECT_PLANE_2_BIT - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_COLOR_ATTACHMENT_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_SAMPLED_BITorVK_IMAGE_USAGE_INPUT_ATTACHMENT_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_TRANSFER_SRC_BITset - If either
oldLayoutornewLayoutisVK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMALthenimagemust have been created withVK_IMAGE_USAGE_TRANSFER_DST_BITset
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
pNextmust beNULLor a pointer to a valid instance ofVkSampleLocationsInfoEXTsrcAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdstAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesoldLayoutmust be a validVkImageLayoutvaluenewLayoutmust be a validVkImageLayoutvalueimagemust be a validVkImagehandlesubresourceRangemust be a validVkImageSubresourceRangestructure
See Also
VkAccessFlags,
VkImage,
VkImageLayout,
VkImageSubresourceRange,
VkStructureType, vkCmdPipelineBarrier,
vkCmdWaitEvents
Constructors
| VkImageMemoryBarrier | |
Fields
| |
Instances
| Eq VkImageMemoryBarrier Source # | |
Methods (==) :: VkImageMemoryBarrier -> VkImageMemoryBarrier -> Bool # (/=) :: VkImageMemoryBarrier -> VkImageMemoryBarrier -> Bool # | |
| Show VkImageMemoryBarrier Source # | |
Methods showsPrec :: Int -> VkImageMemoryBarrier -> ShowS # show :: VkImageMemoryBarrier -> String # showList :: [VkImageMemoryBarrier] -> ShowS # | |
| Storable VkImageMemoryBarrier Source # | |
Methods sizeOf :: VkImageMemoryBarrier -> Int # alignment :: VkImageMemoryBarrier -> Int # peekElemOff :: Ptr VkImageMemoryBarrier -> Int -> IO VkImageMemoryBarrier # pokeElemOff :: Ptr VkImageMemoryBarrier -> Int -> VkImageMemoryBarrier -> IO () # peekByteOff :: Ptr b -> Int -> IO VkImageMemoryBarrier # pokeByteOff :: Ptr b -> Int -> VkImageMemoryBarrier -> IO () # peek :: Ptr VkImageMemoryBarrier -> IO VkImageMemoryBarrier # poke :: Ptr VkImageMemoryBarrier -> VkImageMemoryBarrier -> IO () # | |
data VkBufferCopy Source #
Constructors
| VkBufferCopy | |
Fields
| |
Instances
| Eq VkBufferCopy Source # | |
| Show VkBufferCopy Source # | |
Methods showsPrec :: Int -> VkBufferCopy -> ShowS # show :: VkBufferCopy -> String # showList :: [VkBufferCopy] -> ShowS # | |
| Storable VkBufferCopy Source # | |
Methods sizeOf :: VkBufferCopy -> Int # alignment :: VkBufferCopy -> Int # peekElemOff :: Ptr VkBufferCopy -> Int -> IO VkBufferCopy # pokeElemOff :: Ptr VkBufferCopy -> Int -> VkBufferCopy -> IO () # peekByteOff :: Ptr b -> Int -> IO VkBufferCopy # pokeByteOff :: Ptr b -> Int -> VkBufferCopy -> IO () # peek :: Ptr VkBufferCopy -> IO VkBufferCopy # poke :: Ptr VkBufferCopy -> VkBufferCopy -> IO () # | |
data VkImageCopy Source #
VkImageCopy - Structure specifying an image copy operation
Description
For VK_IMAGE_TYPE_3D images, copies are performed slice by slice
starting with the z member of the srcOffset or dstOffset, and
copying depth slices. For images with multiple layers, copies are
performed layer by layer starting with the baseArrayLayer member of
the srcSubresource or dstSubresource and copying layerCount
layers. Image data can be copied between images with different image
types. If one image is VK_IMAGE_TYPE_3D and the other image is
VK_IMAGE_TYPE_2D with multiple layers, then each slice is copied to or
from a different layer.
Copies involving a multi-planar image
format
specify the region to be copied in terms of the plane to be copied,
not the coordinates of the multi-planar image. This means that copies
accessing the R/B planes of “_422” format images must fit the
copied region within half the width of the parent image, and that
copies accessing the R/B planes of “_420” format images must fit
the copied region within half the width and height of the parent
image.
Valid Usage
- If neither the calling command’s
srcImagenor the calling command’sdstImagehas a multi-planar image format then theaspectMaskmember ofsrcSubresourceanddstSubresourcemust match
- If the calling command’s
srcImagehas aVkFormatwith two planes then thesrcSubresourceaspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BITorVK_IMAGE_ASPECT_PLANE_1_BIT - If the calling command’s
srcImagehas aVkFormatwith three planes then thesrcSubresourceaspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT - If the calling command’s
dstImagehas aVkFormatwith two planes then thedstSubresourceaspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BITorVK_IMAGE_ASPECT_PLANE_1_BIT - If the calling command’s
dstImagehas aVkFormatwith three planes then thedstSubresourceaspectMaskmust beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT - If the calling command’s
srcImagehas a multi-planar image format and thedstImagedoes not have a multi-planar image format, thedstSubresourceaspectMaskmust beVK_IMAGE_ASPECT_COLOR_BIT - If the calling command’s
dstImagehas a multi-planar image format and thesrcImagedoes not have a multi-planar image format, thesrcSubresourceaspectMaskmust beVK_IMAGE_ASPECT_COLOR_BIT - The number of slices of the
extent(for 3D) or layers of thesrcSubresource(for non-3D) must match the number of slices of theextent(for 3D) or layers of thedstSubresource(for non-3D) - If either of the calling command’s
srcImageordstImageparameters are ofVkImageTypeVK_IMAGE_TYPE_3D, thebaseArrayLayerandlayerCountmembers of the corresponding subresource must be0and1, respectively - The
aspectMaskmember ofsrcSubresourcemust specify aspects present in the calling command’ssrcImage - The
aspectMaskmember ofdstSubresourcemust specify aspects present in the calling command’sdstImage srcOffset.xand (extent.width+srcOffset.x) must both be greater than or equal to0and less than or equal to the source image subresource widthsrcOffset.yand (extent.height+srcOffset.y) must both be greater than or equal to0and less than or equal to the source image subresource height- If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_1D, thensrcOffset.ymust be0andextent.heightmust be1. srcOffset.zand (extent.depth+srcOffset.z) must both be greater than or equal to0and less than or equal to the source image subresource depth- If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_1D, thensrcOffset.zmust be0andextent.depthmust be1. - If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_1D, thendstOffset.zmust be0andextent.depthmust be1. - If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_2D, thensrcOffset.zmust be0. - If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_2D, thendstOffset.zmust be0. - If both
srcImageanddstImageare of typeVK_IMAGE_TYPE_2Dthen thenextent.depthmust be1. - If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_2D, and thedstImageis of typeVK_IMAGE_TYPE_3D, thenextent.depthmust equal to thelayerCountmember ofsrcSubresource. - If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_2D, and thesrcImageis of typeVK_IMAGE_TYPE_3D, thenextent.depthmust equal to thelayerCountmember ofdstSubresource. dstOffset.xand (extent.width+dstOffset.x) must both be greater than or equal to0and less than or equal to the destination image subresource widthdstOffset.yand (extent.height+dstOffset.y) must both be greater than or equal to0and less than or equal to the destination image subresource height- If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_1D, thendstOffset.ymust be0andextent.heightmust be1. dstOffset.zand (extent.depth+dstOffset.z) must both be greater than or equal to0and less than or equal to the destination image subresource depth- If the calling command’s
srcImageis a compressed image, or a single-plane, “_422” image format, all members ofsrcOffsetmust be a multiple of the corresponding dimensions of the compressed texel block - If the calling command’s
srcImageis a compressed image, or a single-plane, “_422” image format,extent.widthmust be a multiple of the compressed texel block width or (extent.width+srcOffset.x) must equal the source image subresource width - If the calling command’s
srcImageis a compressed image, or a single-plane, “_422” image format,extent.heightmust be a multiple of the compressed texel block height or (extent.height+srcOffset.y) must equal the source image subresource height - If the calling command’s
srcImageis a compressed image, or a single-plane, “_422” image format,extent.depthmust be a multiple of the compressed texel block depth or (extent.depth+srcOffset.z) must equal the source image subresource depth - If the calling command’s
dstImageis a compressed format image, or a single-plane, “_422” image format, all members ofdstOffsetmust be a multiple of the corresponding dimensions of the compressed texel block - If the calling command’s
dstImageis a compressed format image, or a single-plane, “_422” image format,extent.widthmust be a multiple of the compressed texel block width or (extent.width+dstOffset.x) must equal the destination image subresource width - If the calling command’s
dstImageis a compressed format image, or a single-plane, “_422” image format,extent.heightmust be a multiple of the compressed texel block height or (extent.height+dstOffset.y) must equal the destination image subresource height - If the calling command’s
dstImageis a compressed format image, or a single-plane, “_422” image format,extent.depthmust be a multiple of the compressed texel block depth or (extent.depth+dstOffset.z) must equal the destination image subresource depth
Valid Usage (Implicit)
srcSubresourcemust be a validVkImageSubresourceLayersstructure
dstSubresourcemust be a validVkImageSubresourceLayersstructure
See Also
VkExtent3D,
VkImageSubresourceLayers,
VkOffset3D,
vkCmdCopyImage
Constructors
| VkImageCopy | |
Fields
| |
Instances
| Eq VkImageCopy Source # | |
| Show VkImageCopy Source # | |
Methods showsPrec :: Int -> VkImageCopy -> ShowS # show :: VkImageCopy -> String # showList :: [VkImageCopy] -> ShowS # | |
| Storable VkImageCopy Source # | |
Methods sizeOf :: VkImageCopy -> Int # alignment :: VkImageCopy -> Int # peekElemOff :: Ptr VkImageCopy -> Int -> IO VkImageCopy # pokeElemOff :: Ptr VkImageCopy -> Int -> VkImageCopy -> IO () # peekByteOff :: Ptr b -> Int -> IO VkImageCopy # pokeByteOff :: Ptr b -> Int -> VkImageCopy -> IO () # peek :: Ptr VkImageCopy -> IO VkImageCopy # poke :: Ptr VkImageCopy -> VkImageCopy -> IO () # | |
data VkImageBlit Source #
VkImageBlit - Structure specifying an image blit operation
Description
For each element of the pRegions array, a blit operation is performed
the specified source and destination regions.
Valid Usage
- The
aspectMaskmember ofsrcSubresourceanddstSubresourcemust match
- The
layerCountmember ofsrcSubresourceanddstSubresourcemust match - If either of the calling command’s
srcImageordstImageparameters are ofVkImageTypeVK_IMAGE_TYPE_3D, thebaseArrayLayerandlayerCountmembers of bothsrcSubresourceanddstSubresourcemust be0and1, respectively - The
aspectMaskmember ofsrcSubresourcemust specify aspects present in the calling command’ssrcImage - The
aspectMaskmember ofdstSubresourcemust specify aspects present in the calling command’sdstImage srcOffset[0].xandsrcOffset[1].xmust both be greater than or equal to0and less than or equal to the source image subresource widthsrcOffset[0].yandsrcOffset[1].ymust both be greater than or equal to0and less than or equal to the source image subresource height- If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_1D, thensrcOffset[0].y must be0andsrcOffset[1].y must be1. srcOffset[0].zandsrcOffset[1].zmust both be greater than or equal to0and less than or equal to the source image subresource depth- If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, thensrcOffset[0].z must be0andsrcOffset[1].z must be1. dstOffset[0].xanddstOffset[1].xmust both be greater than or equal to0and less than or equal to the destination image subresource widthdstOffset[0].yanddstOffset[1].ymust both be greater than or equal to0and less than or equal to the destination image subresource height- If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_1D, thendstOffset[0].y must be0anddstOffset[1].y must be1. dstOffset[0].zanddstOffset[1].zmust both be greater than or equal to0and less than or equal to the destination image subresource depth- If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, thendstOffset[0].z must be0anddstOffset[1].z must be1.
Valid Usage (Implicit)
srcSubresourcemust be a validVkImageSubresourceLayersstructure
dstSubresourcemust be a validVkImageSubresourceLayersstructure
See Also
Constructors
| VkImageBlit | |
Fields
| |
Instances
| Eq VkImageBlit Source # | |
| Show VkImageBlit Source # | |
Methods showsPrec :: Int -> VkImageBlit -> ShowS # show :: VkImageBlit -> String # showList :: [VkImageBlit] -> ShowS # | |
| Storable VkImageBlit Source # | |
Methods sizeOf :: VkImageBlit -> Int # alignment :: VkImageBlit -> Int # peekElemOff :: Ptr VkImageBlit -> Int -> IO VkImageBlit # pokeElemOff :: Ptr VkImageBlit -> Int -> VkImageBlit -> IO () # peekByteOff :: Ptr b -> Int -> IO VkImageBlit # pokeByteOff :: Ptr b -> Int -> VkImageBlit -> IO () # peek :: Ptr VkImageBlit -> IO VkImageBlit # poke :: Ptr VkImageBlit -> VkImageBlit -> IO () # | |
data VkBufferImageCopy Source #
VkBufferImageCopy - Structure specifying a buffer image copy operation
Description
When copying to or from a depth or stencil aspect, the data in buffer memory uses a layout that is a (mostly) tightly packed representation of the depth or stencil data. Specifically:
- data copied to or from the stencil aspect of any depth/stencil
format is tightly packed with one
VK_FORMAT_S8_UINTvalue per texel. - data copied to or from the depth aspect of a
VK_FORMAT_D16_UNORMorVK_FORMAT_D16_UNORM_S8_UINTformat is tightly packed with oneVK_FORMAT_D16_UNORMvalue per texel. - data copied to or from the depth aspect of a
VK_FORMAT_D32_SFLOATorVK_FORMAT_D32_SFLOAT_S8_UINTformat is tightly packed with oneVK_FORMAT_D32_SFLOATvalue per texel. - data copied to or from the depth aspect of a
VK_FORMAT_X8_D24_UNORM_PACK32orVK_FORMAT_D24_UNORM_S8_UINTformat is packed with one 32-bit word per texel with the D24 value in the LSBs of the word, and undefined values in the eight MSBs.
Note
To copy both the depth and stencil aspects of a depth/stencil format,
two entries in pRegions can be used, where one specifies the depth
aspect in imageSubresource, and the other specifies the stencil
aspect.
Because depth or stencil aspect buffer to image copies may require format conversions on some implementations, they are not supported on queues that do not support graphics. When copying to a depth aspect, the data in buffer memory must be in the the range [0,1] or undefined results occur.
Copies are done layer by layer starting with image layer
baseArrayLayer member of imageSubresource. layerCount layers are
copied from the source image or to the destination image.
Valid Usage
- If the calling command’s
VkImageparameter’s format is not a depth/stencil format or a multi-planar format, thenbufferOffsetmust be a multiple of the format’s element size
- If the calling command’s
VkImageparameter’s format is a multi-planar format, thenbufferOffsetmust be a multiple of the element size of the compatible format for the format and theaspectMaskof theimageSubresourceas defined in {html_spec_relative}#features-formats-compatible-planes bufferOffsetmust be a multiple of4bufferRowLengthmust be0, or greater than or equal to thewidthmember ofimageExtentbufferImageHeightmust be0, or greater than or equal to theheightmember ofimageExtentimageOffset.xand (imageExtent.width+imageOffset.x) must both be greater than or equal to0and less than or equal to the image subresource width where this refers to the width of the plane of the image involved in the copy in the case of a multi-planar formatimageOffset.yand (imageExtent.height +imageOffset.y) must both be greater than or equal to0and less than or equal to the image subresource height where this refers to the height of the plane of the image involved in the copy in the case of a multi-planar format- If the calling command’s
srcImage(vkCmdCopyImageToBuffer) ordstImage(vkCmdCopyBufferToImage) is of typeVK_IMAGE_TYPE_1D, thenimageOffset.ymust be0andimageExtent.heightmust be1. imageOffset.zand (imageExtent.depth +imageOffset.z) must both be greater than or equal to0and less than or equal to the image subresource depth- If the calling command’s
srcImage(vkCmdCopyImageToBuffer) ordstImage(vkCmdCopyBufferToImage) is of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, thenimageOffset.zmust be0andimageExtent.depthmust be1 - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format,bufferRowLengthmust be a multiple of the compressed texel block width - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format,bufferImageHeightmust be a multiple of the compressed texel block height - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format, all members ofimageOffsetmust be a multiple of the corresponding dimensions of the compressed texel block - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format,bufferOffsetmust be a multiple of the compressed texel block size in bytes - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format,imageExtent.widthmust be a multiple of the compressed texel block width or (imageExtent.width+imageOffset.x) must equal the image subresource width - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format,imageExtent.heightmust be a multiple of the compressed texel block height or (imageExtent.height+imageOffset.y) must equal the image subresource height - If the calling command’s
VkImageparameter is a compressed image, or a single-plane, “_422” image format,imageExtent.depthmust be a multiple of the compressed texel block depth or (imageExtent.depth+imageOffset.z) must equal the image subresource depth - The
aspectMaskmember ofimageSubresourcemust specify aspects present in the calling command’sVkImageparameter - If the calling command’s
VkImageparameter’s format is a multi-planar format, then theaspectMaskmember ofimageSubresourcemust beVK_IMAGE_ASPECT_PLANE_0_BIT,VK_IMAGE_ASPECT_PLANE_1_BIT, orVK_IMAGE_ASPECT_PLANE_2_BIT(withVK_IMAGE_ASPECT_PLANE_2_BITvalid only for image formats with three planes) - The
aspectMaskmember ofimageSubresourcemust only have a single bit set - If the calling command’s
VkImageparameter is ofVkImageTypeVK_IMAGE_TYPE_3D, thebaseArrayLayerandlayerCountmembers ofimageSubresourcemust be0and1, respectively - When copying to the depth aspect of an image subresource, the data in the source buffer must be in the range [0,1]
Valid Usage (Implicit)
imageSubresourcemust be a validVkImageSubresourceLayersstructure
See Also
VkDeviceSize,
VkExtent3D,
VkImageSubresourceLayers,
VkOffset3D,
vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer
Constructors
| VkBufferImageCopy | |
Fields
| |
Instances
| Eq VkBufferImageCopy Source # | |
Methods (==) :: VkBufferImageCopy -> VkBufferImageCopy -> Bool # (/=) :: VkBufferImageCopy -> VkBufferImageCopy -> Bool # | |
| Show VkBufferImageCopy Source # | |
Methods showsPrec :: Int -> VkBufferImageCopy -> ShowS # show :: VkBufferImageCopy -> String # showList :: [VkBufferImageCopy] -> ShowS # | |
| Storable VkBufferImageCopy Source # | |
Methods sizeOf :: VkBufferImageCopy -> Int # alignment :: VkBufferImageCopy -> Int # peekElemOff :: Ptr VkBufferImageCopy -> Int -> IO VkBufferImageCopy # pokeElemOff :: Ptr VkBufferImageCopy -> Int -> VkBufferImageCopy -> IO () # peekByteOff :: Ptr b -> Int -> IO VkBufferImageCopy # pokeByteOff :: Ptr b -> Int -> VkBufferImageCopy -> IO () # peek :: Ptr VkBufferImageCopy -> IO VkBufferImageCopy # poke :: Ptr VkBufferImageCopy -> VkBufferImageCopy -> IO () # | |
data VkImageResolve Source #
VkImageResolve - Structure specifying an image resolve operation
Valid Usage
- The
aspectMaskmember ofsrcSubresourceanddstSubresourcemust only containVK_IMAGE_ASPECT_COLOR_BIT
- The
layerCountmember ofsrcSubresourceanddstSubresourcemust match - If either of the calling command’s
srcImageordstImageparameters are ofVkImageTypeVK_IMAGE_TYPE_3D, thebaseArrayLayerandlayerCountmembers of bothsrcSubresourceanddstSubresourcemust be0and1, respectively srcOffset.xand (extent.width+srcOffset.x) must both be greater than or equal to0and less than or equal to the source image subresource widthsrcOffset.yand (extent.height+srcOffset.y) must both be greater than or equal to0and less than or equal to the source image subresource height- If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_1D, thensrcOffset.ymust be0andextent.heightmust be1. srcOffset.zand (extent.depth+srcOffset.z) must both be greater than or equal to0and less than or equal to the source image subresource depth- If the calling command’s
srcImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, thensrcOffset.zmust be0andextent.depthmust be1. dstOffset.xand (extent.width+dstOffset.x) must both be greater than or equal to0and less than or equal to the destination image subresource widthdstOffset.yand (extent.height+dstOffset.y) must both be greater than or equal to0and less than or equal to the destination image subresource height- If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_1D, thendstOffset.ymust be0andextent.heightmust be1. dstOffset.zand (extent.depth+dstOffset.z) must both be greater than or equal to0and less than or equal to the destination image subresource depth- If the calling command’s
dstImageis of typeVK_IMAGE_TYPE_1DorVK_IMAGE_TYPE_2D, thendstOffset.zmust be0andextent.depthmust be1.
Valid Usage (Implicit)
srcSubresourcemust be a validVkImageSubresourceLayersstructure
dstSubresourcemust be a validVkImageSubresourceLayersstructure
See Also
VkExtent3D,
VkImageSubresourceLayers,
VkOffset3D,
vkCmdResolveImage
Constructors
| VkImageResolve | |
Fields
| |
Instances
| Eq VkImageResolve Source # | |
Methods (==) :: VkImageResolve -> VkImageResolve -> Bool # (/=) :: VkImageResolve -> VkImageResolve -> Bool # | |
| Show VkImageResolve Source # | |
Methods showsPrec :: Int -> VkImageResolve -> ShowS # show :: VkImageResolve -> String # showList :: [VkImageResolve] -> ShowS # | |
| Storable VkImageResolve Source # | |
Methods sizeOf :: VkImageResolve -> Int # alignment :: VkImageResolve -> Int # peekElemOff :: Ptr VkImageResolve -> Int -> IO VkImageResolve # pokeElemOff :: Ptr VkImageResolve -> Int -> VkImageResolve -> IO () # peekByteOff :: Ptr b -> Int -> IO VkImageResolve # pokeByteOff :: Ptr b -> Int -> VkImageResolve -> IO () # peek :: Ptr VkImageResolve -> IO VkImageResolve # poke :: Ptr VkImageResolve -> VkImageResolve -> IO () # | |
data VkRenderPassBeginInfo Source #
VkRenderPassBeginInfo - Structure specifying render pass begin info
Description
renderArea is the render area that is affected by the render pass
instance. The effects of attachment load, store and multisample resolve
operations are restricted to the pixels whose x and y coordinates fall
within the render area on all attachments. The render area extends to
all layers of framebuffer. The application must ensure (using
scissor if necessary) that all rendering is contained within the render
area, otherwise the pixels outside of the render area become undefined
and shader side effects may occur for fragments outside the render
area. The render area must be contained within the framebuffer
dimensions.
When multiview is enabled, the resolve operation at the end of a subpass applies to all views in the view mask.
Note
There may be a performance cost for using a render area smaller than the framebuffer, unless it matches the render area granularity for the render pass.
Valid Usage
clearValueCountmust be greater than the largest attachment index inrenderPassthat specifies aloadOp(orstencilLoadOp, if the attachment has a depth/stencil format) ofVK_ATTACHMENT_LOAD_OP_CLEAR
- If
clearValueCountis not0,pClearValuesmust be a valid pointer to an array ofclearValueCountvalidVkClearValueunions renderPassmust be compatible with therenderPassmember of theVkFramebufferCreateInfostructure specified when creatingframebuffer.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDeviceGroupRenderPassBeginInfoorVkRenderPassSampleLocationsBeginInfoEXT - Each
sTypemember in thepNextchain must be unique renderPassmust be a validVkRenderPasshandleframebuffermust be a validVkFramebufferhandle- Both of
framebuffer, andrenderPassmust have been created, allocated, or retrieved from the sameVkDevice
See Also
VkClearValue, VkFramebuffer,
VkRect2D,
VkRenderPass,
VkStructureType, vkCmdBeginRenderPass
Constructors
| VkRenderPassBeginInfo | |
Fields
| |
Instances
| Eq VkRenderPassBeginInfo Source # | |
Methods (==) :: VkRenderPassBeginInfo -> VkRenderPassBeginInfo -> Bool # (/=) :: VkRenderPassBeginInfo -> VkRenderPassBeginInfo -> Bool # | |
| Show VkRenderPassBeginInfo Source # | |
Methods showsPrec :: Int -> VkRenderPassBeginInfo -> ShowS # show :: VkRenderPassBeginInfo -> String # showList :: [VkRenderPassBeginInfo] -> ShowS # | |
| Storable VkRenderPassBeginInfo Source # | |
Methods sizeOf :: VkRenderPassBeginInfo -> Int # alignment :: VkRenderPassBeginInfo -> Int # peekElemOff :: Ptr VkRenderPassBeginInfo -> Int -> IO VkRenderPassBeginInfo # pokeElemOff :: Ptr VkRenderPassBeginInfo -> Int -> VkRenderPassBeginInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkRenderPassBeginInfo # pokeByteOff :: Ptr b -> Int -> VkRenderPassBeginInfo -> IO () # peek :: Ptr VkRenderPassBeginInfo -> IO VkRenderPassBeginInfo # poke :: Ptr VkRenderPassBeginInfo -> VkRenderPassBeginInfo -> IO () # | |
data VkClearDepthStencilValue Source #
VkClearDepthStencilValue - Structure specifying a clear depth stencil value
Valid Usage
- Unless the
{html_spec_relative}#VK_EXT_depth_range_unrestrictedextension is enableddepthmust be between0.0and1.0, inclusive
See Also
Constructors
| VkClearDepthStencilValue | |
Fields
| |
Instances
| Eq VkClearDepthStencilValue Source # | |
Methods (==) :: VkClearDepthStencilValue -> VkClearDepthStencilValue -> Bool # (/=) :: VkClearDepthStencilValue -> VkClearDepthStencilValue -> Bool # | |
| Show VkClearDepthStencilValue Source # | |
Methods showsPrec :: Int -> VkClearDepthStencilValue -> ShowS # show :: VkClearDepthStencilValue -> String # showList :: [VkClearDepthStencilValue] -> ShowS # | |
| Storable VkClearDepthStencilValue Source # | |
Methods sizeOf :: VkClearDepthStencilValue -> Int # alignment :: VkClearDepthStencilValue -> Int # peekElemOff :: Ptr VkClearDepthStencilValue -> Int -> IO VkClearDepthStencilValue # pokeElemOff :: Ptr VkClearDepthStencilValue -> Int -> VkClearDepthStencilValue -> IO () # peekByteOff :: Ptr b -> Int -> IO VkClearDepthStencilValue # pokeByteOff :: Ptr b -> Int -> VkClearDepthStencilValue -> IO () # peek :: Ptr VkClearDepthStencilValue -> IO VkClearDepthStencilValue # poke :: Ptr VkClearDepthStencilValue -> VkClearDepthStencilValue -> IO () # | |
data VkClearAttachment Source #
VkClearAttachment - Structure specifying a clear attachment
Description
No memory barriers are needed between vkCmdClearAttachments and
preceding or subsequent draw or attachment clear commands in the same
subpass.
The vkCmdClearAttachments command is not affected by the bound
pipeline state.
Attachments can also be cleared at the beginning of a render pass
instance by setting loadOp (or stencilLoadOp) of
VkAttachmentDescription to
VK_ATTACHMENT_LOAD_OP_CLEAR, as described for
vkCreateRenderPass.
Valid Usage
- If
aspectMaskincludesVK_IMAGE_ASPECT_COLOR_BIT, it must not includeVK_IMAGE_ASPECT_DEPTH_BITorVK_IMAGE_ASPECT_STENCIL_BIT
aspectMaskmust not includeVK_IMAGE_ASPECT_METADATA_BITclearValuemust be a validVkClearValueunion
Valid Usage (Implicit)
aspectMaskmust be a valid combination ofVkImageAspectFlagBitsvalues
aspectMaskmust not be0
See Also
Constructors
| VkClearAttachment | |
Fields
| |
Instances
| Eq VkClearAttachment Source # | |
Methods (==) :: VkClearAttachment -> VkClearAttachment -> Bool # (/=) :: VkClearAttachment -> VkClearAttachment -> Bool # | |
| Show VkClearAttachment Source # | |
Methods showsPrec :: Int -> VkClearAttachment -> ShowS # show :: VkClearAttachment -> String # showList :: [VkClearAttachment] -> ShowS # | |
| Storable VkClearAttachment Source # | |
Methods sizeOf :: VkClearAttachment -> Int # alignment :: VkClearAttachment -> Int # peekElemOff :: Ptr VkClearAttachment -> Int -> IO VkClearAttachment # pokeElemOff :: Ptr VkClearAttachment -> Int -> VkClearAttachment -> IO () # peekByteOff :: Ptr b -> Int -> IO VkClearAttachment # pokeByteOff :: Ptr b -> Int -> VkClearAttachment -> IO () # peek :: Ptr VkClearAttachment -> IO VkClearAttachment # poke :: Ptr VkClearAttachment -> VkClearAttachment -> IO () # | |
data VkDrawIndirectCommand Source #
VkDrawIndirectCommand - Structure specifying a draw indirect command
Description
The members of VkDrawIndirectCommand have the same meaning as the
similarly named parameters of vkCmdDraw.
Valid Usage
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in {html_spec_relative}#fxvertex-input
- If the
drawIndirectFirstInstance
feature is not enabled,
firstInstancemust be0
See Also
Constructors
| VkDrawIndirectCommand | |
Fields
| |
Instances
| Eq VkDrawIndirectCommand Source # | |
Methods (==) :: VkDrawIndirectCommand -> VkDrawIndirectCommand -> Bool # (/=) :: VkDrawIndirectCommand -> VkDrawIndirectCommand -> Bool # | |
| Show VkDrawIndirectCommand Source # | |
Methods showsPrec :: Int -> VkDrawIndirectCommand -> ShowS # show :: VkDrawIndirectCommand -> String # showList :: [VkDrawIndirectCommand] -> ShowS # | |
| Storable VkDrawIndirectCommand Source # | |
Methods sizeOf :: VkDrawIndirectCommand -> Int # alignment :: VkDrawIndirectCommand -> Int # peekElemOff :: Ptr VkDrawIndirectCommand -> Int -> IO VkDrawIndirectCommand # pokeElemOff :: Ptr VkDrawIndirectCommand -> Int -> VkDrawIndirectCommand -> IO () # peekByteOff :: Ptr b -> Int -> IO VkDrawIndirectCommand # pokeByteOff :: Ptr b -> Int -> VkDrawIndirectCommand -> IO () # peek :: Ptr VkDrawIndirectCommand -> IO VkDrawIndirectCommand # poke :: Ptr VkDrawIndirectCommand -> VkDrawIndirectCommand -> IO () # | |
data VkDrawIndexedIndirectCommand Source #
VkDrawIndexedIndirectCommand - Structure specifying a draw indexed indirect command
Description
The members of VkDrawIndexedIndirectCommand have the same meaning as
the similarly named parameters of vkCmdDrawIndexed.
Valid Usage
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in {html_spec_relative}#fxvertex-input
- (
indexSize* (firstIndex+indexCount) +offset) must be less than or equal to the size of the bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viavkCmdBindIndexBuffer - If the
drawIndirectFirstInstance
feature is not enabled,
firstInstancemust be0
See Also
Constructors
| VkDrawIndexedIndirectCommand | |
Fields
| |
Instances
data VkDispatchIndirectCommand Source #
VkDispatchIndirectCommand - Structure specifying a dispatch indirect command
Description
The members of VkDispatchIndirectCommand have the same meaning as the
corresponding parameters of vkCmdDispatch.
Valid Usage
xmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[0]
ymust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[1]zmust be less than or equal toVkPhysicalDeviceLimits::maxComputeWorkGroupCount[2]
See Also
Constructors
| VkDispatchIndirectCommand | |
Instances
| Eq VkDispatchIndirectCommand Source # | |
Methods (==) :: VkDispatchIndirectCommand -> VkDispatchIndirectCommand -> Bool # (/=) :: VkDispatchIndirectCommand -> VkDispatchIndirectCommand -> Bool # | |
| Show VkDispatchIndirectCommand Source # | |
Methods showsPrec :: Int -> VkDispatchIndirectCommand -> ShowS # show :: VkDispatchIndirectCommand -> String # showList :: [VkDispatchIndirectCommand] -> ShowS # | |
| Storable VkDispatchIndirectCommand Source # | |
Methods sizeOf :: VkDispatchIndirectCommand -> Int # alignment :: VkDispatchIndirectCommand -> Int # peekElemOff :: Ptr VkDispatchIndirectCommand -> Int -> IO VkDispatchIndirectCommand # pokeElemOff :: Ptr VkDispatchIndirectCommand -> Int -> VkDispatchIndirectCommand -> IO () # peekByteOff :: Ptr b -> Int -> IO VkDispatchIndirectCommand # pokeByteOff :: Ptr b -> Int -> VkDispatchIndirectCommand -> IO () # peek :: Ptr VkDispatchIndirectCommand -> IO VkDispatchIndirectCommand # poke :: Ptr VkDispatchIndirectCommand -> VkDispatchIndirectCommand -> IO () # | |
data VkClearColorValue Source #
VkClearColorValue - Structure specifying a clear color value
Description
The four array elements of the clear color map to R, G, B, and A components of image formats, in order.
If the image has more than one sample, the same value is written to all samples for any pixels being cleared.
See Also
Instances
| Eq VkClearColorValue Source # | |
Methods (==) :: VkClearColorValue -> VkClearColorValue -> Bool # (/=) :: VkClearColorValue -> VkClearColorValue -> Bool # | |
| Show VkClearColorValue Source # | |
Methods showsPrec :: Int -> VkClearColorValue -> ShowS # show :: VkClearColorValue -> String # showList :: [VkClearColorValue] -> ShowS # | |
| Storable VkClearColorValue Source # | _Note_: peek is undefined as we wouldn't know which constructor to use |
Methods sizeOf :: VkClearColorValue -> Int # alignment :: VkClearColorValue -> Int # peekElemOff :: Ptr VkClearColorValue -> Int -> IO VkClearColorValue # pokeElemOff :: Ptr VkClearColorValue -> Int -> VkClearColorValue -> IO () # peekByteOff :: Ptr b -> Int -> IO VkClearColorValue # pokeByteOff :: Ptr b -> Int -> VkClearColorValue -> IO () # peek :: Ptr VkClearColorValue -> IO VkClearColorValue # poke :: Ptr VkClearColorValue -> VkClearColorValue -> IO () # | |
data VkClearValue Source #
VkClearValue - Structure specifying a clear value
Description
This union is used where part of the API requires either color or
depth/stencil clear values, depending on the attachment, and defines
the initial clear values in the VkRenderPassBeginInfo structure.
Valid Usage
depthStencilmust be a validVkClearDepthStencilValuestructure
See Also
VkClearAttachment, VkClearColorValue, VkClearDepthStencilValue,
VkRenderPassBeginInfo
Instances
| Eq VkClearValue Source # | |
| Show VkClearValue Source # | |
Methods showsPrec :: Int -> VkClearValue -> ShowS # show :: VkClearValue -> String # showList :: [VkClearValue] -> ShowS # | |
| Storable VkClearValue Source # | _Note_: peek is undefined as we wouldn't know which constructor to use |
Methods sizeOf :: VkClearValue -> Int # alignment :: VkClearValue -> Int # peekElemOff :: Ptr VkClearValue -> Int -> IO VkClearValue # pokeElemOff :: Ptr VkClearValue -> Int -> VkClearValue -> IO () # peekByteOff :: Ptr b -> Int -> IO VkClearValue # pokeByteOff :: Ptr b -> Int -> VkClearValue -> IO () # peek :: Ptr VkClearValue -> IO VkClearValue # poke :: Ptr VkClearValue -> VkClearValue -> IO () # | |
type VkStencilFaceFlags = VkStencilFaceFlagBits Source #
VkStencilFaceFlags - Bitmask of VkStencilFaceFlagBits
Description
VkStencilFaceFlags is a bitmask type for setting a mask of zero or
more VkStencilFaceFlagBits.
See Also
VkStencilFaceFlagBits, vkCmdSetStencilCompareMask,
vkCmdSetStencilReference, vkCmdSetStencilWriteMask