Interface CommandBuffer

Base interface for a command buffer

interface CommandBuffer ;

CommandBuffer are allocated and owned by a command pool. A command buffer can be in three defined states: 1. invalid - that is the state after it as been created or reset 2. recoding - that is the state between begin() and end() calls() 3. pending - that is the state when recording is done and commands are ready for execution.

A command buffer in pending state can only go back to the initial state by a call to reset(). This call must not occur before all submitted executions are finished in the device queues.

Properties

NameTypeDescription
level[get] CommandBufferLevel
pool[get] CommandPool

Methods

NameDescription
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