WgslModuleCompiler class abstract interface

Turns WGSL text into whatever the backend's module object is.

One method, because one method is the whole of what a shader library cannot do without a device. Everything else here — looking a name up, merging two stages' reflection, turning a VertexLayoutSpec into buffers and locations — is arithmetic over the sidecar and belongs on the VM. Declaring the seam as an interface is what keeps it there, and it is what lets a test compile a "module" that is a String and still exercise the caching, the refusals and the reload.

Implemented by the device, which is the only holder of a GPUDevice.

Implementers

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

compileModule(String name, String wgsl) → Object
The module for wgsl, or a throw naming name and quoting the compiler.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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