gfx-rs/wgpu · error
Web backend does not support BINDING_INDEXING extension
Error message
Web backend does not support BINDING_INDEXING extension
What it means
Raised when creating a bind group whose entry is a BindingResource::TextureViewArray. Texture view arrays require the bindless/BINDING_INDEXING-style capability that the web backend does not support, so the code panics with this message. Functionally the same limitation as buffer/sampler arrays: one texture view per bind group entry only.
Source
Thrown at wgpu/src/backend/webgpu.rs:2329
crate::BindingResource::BufferArray(..) => {
panic!("Web backend does not support arrays of buffers")
}
crate::BindingResource::Sampler(sampler) => {
let sampler = &sampler.inner.as_webgpu().inner;
webgpu_sys::GpuBindGroupEntry::new(binding.binding, sampler)
}
crate::BindingResource::SamplerArray(..) => {
panic!("Web backend does not support arrays of samplers")
}
crate::BindingResource::TextureView(texture_view) => {
let texture_view = &texture_view.inner.as_webgpu().inner;
webgpu_sys::GpuBindGroupEntry::new_with_gpu_texture_view(
binding.binding,
texture_view,
)
}
crate::BindingResource::TextureViewArray(..) => {
panic!("Web backend does not support BINDING_INDEXING extension")
}
crate::BindingResource::AccelerationStructure(_) => {
unimplemented!("Raytracing not implemented for web")
}
crate::BindingResource::AccelerationStructureArray(_) => {
unimplemented!("Raytracing not implemented for web")
}
crate::BindingResource::ExternalTexture(external_texture) => {
let external_texture = &external_texture.inner.as_webgpu().inner;
webgpu_sys::GpuBindGroupEntry::new_with_gpu_external_texture(
binding.binding,
external_texture,
)
}
})
.collect::<Vec<webgpu_sys::GpuBindGroupEntry>>();
let bgl = &desc.layout.inner.as_webgpu().inner;View on GitHub (pinned to 3e11ff59bf)
Solutions
- Bind each texture view as a separate BindGroupEntry with distinct binding indices.
- Use a texture 2D array image (texture_2d_array) with a single view instead of an array of separate textures.
- Restrict TextureViewArray usage to native backends via a backend check and alternate layout on web.
Example fix
// before
entries.push(wgpu::BindGroupEntry { binding: 0, resource: wgpu::BindingResource::TextureViewArray(&views) });
// after
for (i, v) in views.iter().enumerate() {
entries.push(wgpu::BindGroupEntry { binding: i as u32, resource: wgpu::BindingResource::TextureView(v) });
} Defensive patterns
Strategy: validation
Validate before calling
for e in &entries {
assert!(!matches!(e.resource, wgpu::BindingResource::TextureViewArray(_)), "TextureViewArray unsupported on web backend");
} Type guard
fn has_no_view_array(entries: &[wgpu::BindGroupEntry]) -> bool {
entries.iter().all(|e| !matches!(e.resource, wgpu::BindingResource::TextureViewArray(_)))
} Prevention
- Prefer texture_2d_array with a single view over arrays of separate views.
- Use per-entry bindings when the texture count is small.
- Gate bindless-style code behind a native-only feature flag.
When it happens
Trigger: Calling device.create_bind_group with a BindGroupEntry whose resource is BindingResource::TextureViewArray(&[...]) on the web backend, for a layout entry declaring an array of sampled textures.
Common situations: Bindless texture atlases / texture arrays indexed in shaders, written for native; material systems with dynamic texture indices; porting desktop renderers to wasm32-web.
Related errors
- multi-plane textures are not supported
- Web backend does not support arrays of buffers
- Web backend does not support arrays of samplers
- Clamp to border is not supported
- found `ShaderSource::Dummy`
AI-assisted analysis of gfx-rs/wgpu@3e11ff59bf (2026-09-03).
Data as JSON: /api/errors/df5d40bc1251207b.
Report an issue: GitHub.