Interface PrimaryCommandBuffer

Interface to a primary command buffer

interface PrimaryCommandBuffer
  : CommandBuffer ;

A primary command buffer can be submitted directly to a queue and also execute commands that are recorded in a secondary command buffer.

Primary command buffers are doing most of their work when tied to a render pass. As they are not thread safe, it means that recording commands to the same framebuffer cannot be parallelized with PrimaryCommandBuffer. If this is needed, SecondaryCommandBuffer (from other CommandPool) can be filled in parallel, and later executed on a PrimaryCommandBuffer

Properties

NameTypeDescription
level[get] CommandBufferLevel
pool[get] CommandPool

Methods

NameDescription
beginRenderPass (rp, fb, area, clearValues) Place the command buffer into a render pass context
endRenderPass ()
execute (buffers) Execute secondary buffers into this primary buffer
nextSubpass ()
begin (usage) Begin recording and switches the buffer state from "invalid" to "recording" SecondaryCommandBuffer can alternatively call beginWithinRenderPass
bindDescriptorSets (bindPoint, layout, firstSet, sets, dynamicOffsets)
bindIndexBuffer (indexBuf, offset, type)
bindPipeline (pipeline)
bindVertexBuffers (firstBinding, bindings)
clearColorImage (image, layout, clearValues, ranges)
clearDepthStencilImage (image, layout, clearValues, ranges)
copyBuffer (buffers, regions)
copyBufferToImage (srcBuffer, dstImage, dstLayout, regions)
draw (vertexCount, instanceCount, firstVertex, firstInstance)
drawIndexed (indexCount, instanceCount, firstVertex, vertexOffset, firstInstance)
end ()
fillBuffer (dst, offset, size, value) Fills buffer from offset to offset+size with value
pipelineBarrier (stageTrans, bufMbs, imgMbs)
pushConstants (layout, stages, offset, size, data)
reset ()
setBlendConstants (blendConstants)
setDepthBias (constFactor, clamp, slopeFactor)
setDepthBounds (minDepth, maxDepth)
setLineWidth (lineWidth)
setScissor (firstScissor, scissors)
setStencilCompareMask (faceMask, compareMask)
setStencilReference (faceMask, reference)
setStencilWriteMask (faceMask, writeMask)
setViewport (firstViewport, viewports)
updateBuffer (dst, offset, data) Update buffer with the data passed as argument