{"record":{"id":"df5d40bc1251207b","repo":"gfx-rs/wgpu","slug":"web-backend-does-not-support-binding-indexing-exte","errorCode":null,"errorMessage":"Web backend does not support BINDING_INDEXING extension","messagePattern":"Web backend does not support BINDING_INDEXING extension","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu/src/backend/webgpu.rs","lineNumber":2329,"sourceCode":"                crate::BindingResource::BufferArray(..) => {\n                    panic!(\"Web backend does not support arrays of buffers\")\n                }\n                crate::BindingResource::Sampler(sampler) => {\n                    let sampler = &sampler.inner.as_webgpu().inner;\n                    webgpu_sys::GpuBindGroupEntry::new(binding.binding, sampler)\n                }\n                crate::BindingResource::SamplerArray(..) => {\n                    panic!(\"Web backend does not support arrays of samplers\")\n                }\n                crate::BindingResource::TextureView(texture_view) => {\n                    let texture_view = &texture_view.inner.as_webgpu().inner;\n                    webgpu_sys::GpuBindGroupEntry::new_with_gpu_texture_view(\n                        binding.binding,\n                        texture_view,\n                    )\n                }\n                crate::BindingResource::TextureViewArray(..) => {\n                    panic!(\"Web backend does not support BINDING_INDEXING extension\")\n                }\n                crate::BindingResource::AccelerationStructure(_) => {\n                    unimplemented!(\"Raytracing not implemented for web\")\n                }\n                crate::BindingResource::AccelerationStructureArray(_) => {\n                    unimplemented!(\"Raytracing not implemented for web\")\n                }\n                crate::BindingResource::ExternalTexture(external_texture) => {\n                    let external_texture = &external_texture.inner.as_webgpu().inner;\n                    webgpu_sys::GpuBindGroupEntry::new_with_gpu_external_texture(\n                        binding.binding,\n                        external_texture,\n                    )\n                }\n            })\n            .collect::<Vec<webgpu_sys::GpuBindGroupEntry>>();\n\n        let bgl = &desc.layout.inner.as_webgpu().inner;","sourceCodeStart":2311,"sourceCodeEnd":2347,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu/src/backend/webgpu.rs#L2311-L2347","documentation":"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.","triggerScenarios":"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.","commonSituations":"Bindless texture atlases / texture arrays indexed in shaders, written for native; material systems with dynamic texture indices; porting desktop renderers to wasm32-web.","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."],"exampleFix":"// before\nentries.push(wgpu::BindGroupEntry { binding: 0, resource: wgpu::BindingResource::TextureViewArray(&views) });\n// after\nfor (i, v) in views.iter().enumerate() {\n    entries.push(wgpu::BindGroupEntry { binding: i as u32, resource: wgpu::BindingResource::TextureView(v) });\n}","handlingStrategy":"validation","validationCode":"for e in &entries {\n    assert!(!matches!(e.resource, wgpu::BindingResource::TextureViewArray(_)), \"TextureViewArray unsupported on web backend\");\n}","typeGuard":"fn has_no_view_array(entries: &[wgpu::BindGroupEntry]) -> bool {\n    entries.iter().all(|e| !matches!(e.resource, wgpu::BindingResource::TextureViewArray(_)))\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["webgpu","wasm","bind-group","texture","unsupported-feature"],"backgroundTag":"texture-view-array-unsupported-on-web","analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}