mirror of
https://github.com/bevyengine/bevy.git
synced 2026-05-06 06:06:42 -04:00
6fcf9a6dcc
# 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>