Skip to content

feat(graphics): adopt WGSL sized_binding_array once Chrome ships it unflagged #8792

@mvaligursky

Description

@mvaligursky

Background

The sized_binding_array WGSL proposal adds a binding_array<T, N> type that supports dynamic indexing across an array of bindings — closing one of the major WebGL → WebGPU porting gaps, and enabling bindless-style patterns for textures, samplers, and buffers.

Example:

```wgsl
@group(0) @binding(0) var textures: binding_array<texture_2d, 8>;
@group(0) @binding(1) var samp: sampler;

@Fragment
fn fs(in: VsOut) -> @location(0) vec4f {
let idx = in.materialIndex;
return textureSample(textures[idx], samp, in.uv);
}
```

Status

As of Chrome 148 (May 2026 investigation), the feature appears to still be behind flags / not exposed via navigator.gpu.wgslLanguageFeatures as a stable entry. This issue is a placeholder — do not act on it until Chrome ships it unflagged.

What to do when it ships

  1. Add the standard WGSL feature cap infrastructure (supportsSizedBindingArray, CAPS_SIZED_BINDING_ARRAY, requires sized_binding_array;) — same shape as feat(graphics): expose WGSL unrestricted_pointer_parameters as a device cap #8785, feat(graphics): expose WGSL pointer_composite_access as a device cap #8786, feat(graphics): expose WGSL packed_4x8_integer_dot_product as a device cap #8787.
  2. Evaluate use cases: candidate consumers in the engine include material variants (texture atlas/array indirection), gsplat tile lookups, IBL chains, anything currently working around fixed binding slots with branching or duplicated shaders.
  3. Consider adding a BindGroupFormat API extension for declaring binding arrays on the JS side.

Triggers to revisit

  • Chrome release notes announce sized_binding_array is on by default (no flags)
  • navigator.gpu.wgslLanguageFeatures.has('sized_binding_array') returns true in stable Chrome

References

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions