TransferEncoder class abstract base

Records copies; submit hands them to the queue.

A copy names no aspect. A texture with both depth and stencil cannot be copied to or from a buffer as one block of bytes, and every backend refuses such a copy with an ArgumentError; a depth-only format copies its depth. Texture-to-texture copies of a combined format copy both.

Implementable outside this package, and stays so through 1.x. It does not grow within a major: a capability added later arrives beside it — a second interface an implementation opts into, or a member with a default on a base class — so an implementation written against 1.0 keeps compiling.

Constructors

TransferEncoder()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearBuffer(StorageBuffer buffer, {int offsetInBytes = 0, int? sizeInBytes}) → void
Zeroes sizeInBytes bytes (to the end by default) of buffer from offsetInBytes. DeviceFeature.bufferCopy.
copyBufferToBuffer(StorageBuffer source, int sourceOffset, StorageBuffer destination, int destinationOffset, int size) → void
Copies size bytes from source at sourceOffset into destination at destinationOffset. Offsets and size are multiples of four. DeviceFeature.bufferCopy.
copyBufferToTexture(StorageBuffer source, BufferTextureLayout layout, TextureCopyLocation destination, {required int width, required int height, int depthOrArrayLayers = 1}) → void
Copies texels laid out in source as layout into destination. DeviceFeature.bufferTextureCopy.
copyTextureToBuffer(TextureCopyLocation source, StorageBuffer destination, BufferTextureLayout layout, {required int width, required int height, int depthOrArrayLayers = 1}) → void
Copies texels from source into destination, laid out as layout. DeviceFeature.bufferTextureCopy.
copyTextureToTexture(TextureCopyLocation source, TextureCopyLocation destination, {required int width, required int height, int depthOrArrayLayers = 1}) → void
Copies a width × height × depthOrArrayLayers box of texels from source to destination. The two textures share a format (or differ only in sRGB-ness) and a sample count. DeviceFeature.textureCopy.
insertDebugMarker(String label) → void
Marks one point in the command stream with label.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
popDebugGroup() → void
Closes the group the last pushDebugGroup opened.
pushDebugGroup(String label) → void
Opens a named group around the commands recorded until the matching popDebugGroup, for a GPU debugger or a frame capture to show as one node. Groups nest. Does nothing on a backend without markers.
resolveTexture(TextureCopyLocation source, TextureCopyLocation destination) → void
Resolves the multisampled source into the single-sample destination of the same size and format — the explicit form of a pass's ColorTarget.resolveTexture, for a target several passes drew into. DeviceFeature.offscreenMultisample. WebGL2's blitFramebuffer; WebGPU does it with an empty pass that resolves.
submit() → void
Hands the copies to the queue. Nothing recorded after this reaches it.
toString() → String
A string representation of this object.
inherited

Operators

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