CompiledStage class final

What one stage's compilation produced: its SPIR-V, the text of the target it was translated into, and the uniform offsets glslang laid out.

The backend author's half of the shader contract (D27): a backend that loads SPIR-V (Vulkan) takes spirv; one that loads a language (WebGPU's WGSL, Metal's MSL, Direct3D's HLSL) takes text for the target it asked for. A class rather than a record, so a later minor can hand over more — reflection, a source map — without changing its shape.

Constructors

CompiledStage({required Uint8List spirv, required ShaderTarget target, required String? text, required Map<String, Map<String, int>> offsets})

Properties

hashCode → int
The hash code for this object.
no setterinherited
offsets → Map<String, Map<String, int>>
glslang's own Offset per uniform block member, by block.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spirv → Uint8List
The stage as SPIR-V, what glslang made of the GLSL.
final
target → ShaderTarget
What text is in.
final
text → String?
The stage in target's language, or null when target is ShaderTarget.spirv.
final
wgsl → String
text as WGSL. Throws a StateError for a stage compiled to another target.
no setter

Methods

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