WebGpuBlock class final

One uniform block, by the type name the engine binds it under.

The offsets are std140's, computed by the packer from the GLSL rather than read back out of the WGSL. That is not a shortcut: the GLSL is compiled with an explicit std140 on every block, so the packing is stated rather than negotiated, and WGSL's uniform address space lays a struct of vectors and matrices out the same way. tool/generate_shaders.dart checks the arithmetic against glslang's own Offset decorations on every block it writes, which is the only place the two could ever disagree.

Constructors

WebGpuBlock({required String name, required int group, required int binding, required int sizeInBytes, required List<WebGpuBlockMember> members})
const

Properties

binding int
final
group int
final
hashCode int
The hash code for this object.
no setterinherited
members List<WebGpuBlockMember>
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeInBytes int
The whole block, rounded up the way std140 rounds a structure up.
final

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