ShaderTarget class final

What a stage's SPIR-V is translated into for a backend: WGSL for WebGPU, Metal's shading language, HLSL, a GLSL dialect, or nothing — the SPIR-V itself, for a backend that loads it (Vulkan).

An open set (S0): a class with constants rather than an enum, so a target a later minor adds breaks no switch a backend wrote. name is what a bundle section or a build script writes for it, and byName reads it back.

Properties

extension → String?
The file extension the translator reads the target from, or null for spirv, which is translated into nothing.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
The stable name, and the wire name. Never renamed within a major.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

byName(String name) → ShaderTarget?
The target called name, or null for one this version does not know.

Constants

glsl → const ShaderTarget
GLSL, as the translator writes it for the stage's kind.
hlsl → const ShaderTarget
Direct3D's language, shader model 5.1 and later.
msl → const ShaderTarget
Metal's shading language.
spirv → const ShaderTarget
The SPIR-V alone: no text is made.
values → const List<ShaderTarget>
Every target this version names, in declaration order. A later version appends; nothing is removed or renamed within a major.
wgsl → const ShaderTarget
WebGPU's language, checked by reading it back.