GpuCommandEncoder class abstract interface

A command encoder for recording GPU commands.

See WebGPU spec: GPUCommandEncoder.

Implemented types
Available extensions

Properties

hashCode int
The hash code for this object.
no setterinherited
label String
A human-readable label for debugging.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

beginComputePass({GpuComputePassTimestampWrites? timestampWrites, String label = ''}) GpuComputePassEncoder
Begins a compute pass.
beginRenderPass({required List<GpuColorAttachment> colorAttachments, GpuDepthStencilAttachment? depthStencilAttachment, GpuQuerySet? occlusionQuerySet, GpuRenderPassTimestampWrites? timestampWrites, int maxDrawCount = 50000000, String label = ''}) GpuRenderPassEncoder
Begins a render pass.
clearBuffer(GpuBuffer buffer, {int offset = 0, int? size}) → void
Clears a buffer to zeros.
copyBufferToBuffer({required GpuBuffer source, int sourceOffset = 0, required GpuBuffer destination, int destinationOffset = 0, required int size}) → void
Copies data from one buffer to another.
copyBufferToTexture({required GpuBuffer source, required GpuTexture destination, required int bytesPerRow, required int width, required int height, int? rowsPerImage, int depth = 1, int mipLevel = 0, int originX = 0, int originY = 0, int originZ = 0}) → void
Copies data from a buffer to a texture.
copyTextureToBuffer({required GpuTexture source, required GpuBuffer destination, required int bytesPerRow, required int width, required int height, int? rowsPerImage, int depth = 1, int mipLevel = 0, int originX = 0, int originY = 0, int originZ = 0}) → void
Copies data from a texture to a buffer.
copyTextureToTexture({required GpuTexture source, required GpuTexture destination, required int width, required int height, int depth = 1, int srcMipLevel = 0, int srcOriginX = 0, int srcOriginY = 0, int srcOriginZ = 0, int dstMipLevel = 0, int dstOriginX = 0, int dstOriginY = 0, int dstOriginZ = 0}) → void
Copies data from one texture to another.
finish({String label = ''}) GpuCommandBuffer
Finishes recording and returns a command buffer.
insertDebugMarker(String label) → void
Inserts a debug marker into the command stream.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
popDebugGroup() → void
Ends the current debug group.
pushDebugGroup(String label) → void
Begins a named debug group.
resolveQuerySet(GpuQuerySet querySet, {required int firstQuery, required int queryCount, required GpuBuffer destination, int destinationOffset = 0}) → void
Resolves query set results to a buffer.
toString() String
A string representation of this object.
inherited
writeTimestamp(GpuQuerySet querySet, int queryIndex) → void

Available on GpuCommandEncoder, provided by the WgpuCommandEncoderTimestamp extension

Writes a GPU timestamp to a query set (wgpu only).

Operators

operator ==(Object other) bool
The equality operator.
inherited