PrimaryCommandBuffer

Interface to a primary command buffer

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

Members

Functions

beginRenderPass
void beginRenderPass(RenderPass rp, Framebuffer fb, Rect area, ClearValues[] clearValues)

Place the command buffer into a render pass context

endRenderPass
void endRenderPass()
Undocumented in source.
execute
void execute(SecondaryCommandBuffer[] buffers)

Execute secondary buffers into this primary buffer

nextSubpass
void nextSubpass()
Undocumented in source.

Inherited Members

From CommandBuffer

pool
CommandPool pool [@property getter]
Undocumented in source.
level
CommandBufferLevel level [@property getter]
Undocumented in source.
reset
void reset()
Undocumented in source.
begin
void begin(CommandBufferUsage usage)

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

end
void end()
Undocumented in source.
pipelineBarrier
void pipelineBarrier(Trans!PipelineStage stageTrans, BufferMemoryBarrier[] bufMbs, ImageMemoryBarrier[] imgMbs)
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.
fillBuffer
void fillBuffer(Buffer dst, size_t offset, size_t size, uint value)

Fills buffer from offset to offset+size with value

updateBuffer
void updateBuffer(Buffer dst, size_t offset, uint[] data)

Update buffer with the data passed as argument

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.
setViewport
void setViewport(uint firstViewport, Viewport[] viewports)
Undocumented in source.
setScissor
void setScissor(uint firstScissor, Rect[] scissors)
Undocumented in source.
setDepthBounds
void setDepthBounds(float minDepth, float maxDepth)
Undocumented in source.
setLineWidth
void setLineWidth(float lineWidth)
Undocumented in source.
setDepthBias
void setDepthBias(float constFactor, float clamp, float slopeFactor)
Undocumented in source.
setStencilCompareMask
void setStencilCompareMask(StencilFace faceMask, uint compareMask)
Undocumented in source.
setStencilWriteMask
void setStencilWriteMask(StencilFace faceMask, uint writeMask)
Undocumented in source.
setStencilReference
void setStencilReference(StencilFace faceMask, uint reference)
Undocumented in source.
setBlendConstants
void setBlendConstants(float[4] blendConstants)
Undocumented in source.
bindPipeline
void bindPipeline(Pipeline pipeline)
Undocumented in source.
bindVertexBuffers
void bindVertexBuffers(uint firstBinding, VertexBinding[] bindings)
Undocumented in source.
bindIndexBuffer
void bindIndexBuffer(Buffer indexBuf, size_t offset, IndexType type)
Undocumented in source.
bindDescriptorSets
void bindDescriptorSets(PipelineBindPoint bindPoint, PipelineLayout layout, uint firstSet, DescriptorSet[] sets, size_t[] dynamicOffsets)
Undocumented in source.
pushConstants
void pushConstants(PipelineLayout layout, ShaderStage stages, size_t offset, size_t size, const(void)* data)
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.

Meta