Files
Luo Zhihao 6fcf9a6dcc Create mesh view bind group layout on demand to remove unused bindings (#23982)
# Objective

Fixes #23627.

`MeshPipelineViewLayoutKey` uses too many bindings even if features like
ssr, environment map are unused.

## Solution

Don't pre-allocate every combination that grows exponentially. Instead,
create mesh view bind group layout on demand so that we can add more
view keys to reduce unused bindings.

`MeshPipelineViewLayouts::get_view_layout` will be slower, but I'm not
sure how slow it is. My feeling is that the overhead is not high,
compared to when we clone it before.

## Testing

```
WGPU_SETTINGS_PRIO=webgl2 cargo r --example 3d_scene
cargo r --example ssr --features bluenoise_texture
cargo r --example ssao
cargo r --example irradiance_volumes
```

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Kevin Chen <chen.kevin.f@gmail.com>
2026-05-01 21:08:28 +00:00
..