Struct CommandEncoder

An object that encodes GPU operations.

struct CommandEncoder ;

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.

Fields

NameTypeDescription
descriptor const(__C.WGPUCommandEncoderDescriptor)Describes a CommandEncoder.
id __C.WGPUCommandEncoderImpl*Handle identifier.

Methods

NameDescription
beginComputePass (descriptor) Begins recording of a compute pass.
beginRenderPass (colorAttachments, label) Begins recording of a render pass.
beginRenderPass (colorAttachment, depthStencilAttachment, label) Begins recording of a render pass.
beginRenderPass (colorAttachments, depthStencilAttachment, label) Begins recording of a render pass.
beginRenderPass (descriptor) Begins recording of a render pass.
copyBufferToTexture (source, destination) Copy data from a Buffer to a Texture.
copyBufferToTexture (source, destination, copySize) Copy data from a buffer to a texture.
copyTextureToBuffer (source, destination) Copy data from a Texture to a Buffer.
copyTextureToBuffer (source, destination, copySize) Copy data from a Texture to a Buffer.
copyTextureToBuffer (source, destination, copySize) Copy data from a texture to a buffer.
finish () Finishes recording and returns a CommandBuffer that can be submitted for execution.

See Also

wgpu::CommandEncoder