CommandEncoder

An object that encodes GPU operations.

A CommandEncoder can record RenderPasses, ComputePasses, and transfer operations between driver-managed resources like Buffers and Textures.

When finished recording, call CommandEncoder.finish to obtain a CommandBuffer which may be submitted for execution.

Members

Functions

beginComputePass
ComputePass beginComputePass(ComputePassDescriptor descriptor)

Begins recording of a compute pass.

beginRenderPass
RenderPass beginRenderPass(RenderPassDescriptor descriptor)

Begins recording of a render pass.

copyTextureToBuffer
void copyTextureToBuffer(TextureCopyView source, BufferCopyView destination, Extent3d copySize)

Copy data from a texture to a buffer.

finish
CommandBuffer finish()

Finishes recording and returns a CommandBuffer that can be submitted for execution.

Variables

descriptor
CommandEncoderDescriptor descriptor;

Describes a CommandEncoder.

id
WgpuId id;

Handle identifier.

See Also

Meta