CommandBuffer

Base interface for a command buffer

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.

interface CommandBuffer {}

Members

Functions

begin
void begin(CommandBufferUsage usage)

Begin recording and switches the buffer state from "invalid" to "recording" SecondaryCommandBuffer can alternatively call beginWithinRenderPass

bindDescriptorSets
void bindDescriptorSets(PipelineBindPoint bindPoint, PipelineLayout layout, uint firstSet, DescriptorSet[] sets, size_t[] dynamicOffsets)
Undocumented in source.
bindIndexBuffer
void bindIndexBuffer(Buffer indexBuf, size_t offset, IndexType type)
Undocumented in source.
bindPipeline
void bindPipeline(Pipeline pipeline)
Undocumented in source.
bindVertexBuffers
void bindVertexBuffers(uint firstBinding, VertexBinding[] bindings)
Undocumented in source.
clearColorImage
void clearColorImage(ImageBase image, ImageLayout layout, ClearColorValues clearValues, ImageSubresourceRange[] ranges)
Undocumented in source.
clearDepthStencilImage
void clearDepthStencilImage(ImageBase image, ImageLayout layout, ClearDepthStencilValues clearValues, ImageSubresourceRange[] ranges)
Undocumented in source.
copyBuffer
void copyBuffer(Trans!Buffer buffers, CopyRegion[] regions)
Undocumented in source.
copyBufferToImage
void copyBufferToImage(Buffer srcBuffer, ImageBase dstImage, ImageLayout dstLayout, BufferImageCopy[] regions)
Undocumented in source.
draw
void draw(uint vertexCount, uint instanceCount, uint firstVertex, uint firstInstance)
Undocumented in source.
drawIndexed
void drawIndexed(uint indexCount, uint instanceCount, uint firstVertex, int vertexOffset, uint firstInstance)
Undocumented in source.
end
void end()
Undocumented in source.
fillBuffer
void fillBuffer(Buffer dst, size_t offset, size_t size, uint value)

Fills buffer from offset to offset+size with value

pipelineBarrier
void pipelineBarrier(Trans!PipelineStage stageTrans, BufferMemoryBarrier[] bufMbs, ImageMemoryBarrier[] imgMbs)
Undocumented in source.
pushConstants
void pushConstants(PipelineLayout layout, ShaderStage stages, size_t offset, size_t size, const(void)* data)
Undocumented in source.
reset
void reset()
Undocumented in source.
setBlendConstants
void setBlendConstants(float[4] blendConstants)
Undocumented in source.
setDepthBias
void setDepthBias(float constFactor, float clamp, float slopeFactor)
Undocumented in source.
setDepthBounds
void setDepthBounds(float minDepth, float maxDepth)
Undocumented in source.
setLineWidth
void setLineWidth(float lineWidth)
Undocumented in source.
setScissor
void setScissor(uint firstScissor, Rect[] scissors)
Undocumented in source.
setStencilCompareMask
void setStencilCompareMask(StencilFace faceMask, uint compareMask)
Undocumented in source.
setStencilReference
void setStencilReference(StencilFace faceMask, uint reference)
Undocumented in source.
setStencilWriteMask
void setStencilWriteMask(StencilFace faceMask, uint writeMask)
Undocumented in source.
setViewport
void setViewport(uint firstViewport, Viewport[] viewports)
Undocumented in source.
updateBuffer
void updateBuffer(Buffer dst, size_t offset, uint[] data)

Update buffer with the data passed as argument

Properties

level
CommandBufferLevel level [@property getter]
Undocumented in source.
pool
CommandPool pool [@property getter]
Undocumented in source.

Meta