bevy/crates
Jonas Matser 7342d463b8 Use a sorted Map for vertex buffer attributes (#1796)
The `VertexBufferLayout` returned by `crates\bevy_render\src\mesh\mesh.rs:308` was unstable, because `HashMap.iter()` has a random order. This caused the pipeline_compiler to wrongly consider a specialization to be different (`crates\bevy_render\src\pipeline\pipeline_compiler.rs:123`), causing each mesh changed event to potentially result in a different `PipelineSpecialization`. This in turn caused `Draw` to emit a `set_pipeline` much more often than needed.

This fix shaves off a `BindPipeline` and two `BindDescriptorSets` (for the Camera and for global renderresources) for every mesh after the first that can now use the same specialization, where it didn't before (which was random).

`StableHashMap` was not a good replacement, because it isn't `Clone`, so instead I replaced it with a `BTreeMap` which is OK in this instance, because there shouldn't be many insertions on `Mesh.attributes` after the mesh is created.
2021-04-13 03:31:29 +00:00
..
bevy_app Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_asset Make some asset loading functions monomorphic (#1861) 2021-04-10 16:17:32 +00:00
bevy_audio Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_core Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_derive Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_diagnostic Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dylib Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dynamic_plugin Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_ecs fix 'attempted to subtract with overflow' for State::inactives (#1668) 2021-04-10 16:33:35 +00:00
bevy_gilrs Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_gltf Error message improvements for shader compilation/gltf loading (#1786) 2021-04-13 02:56:30 +00:00
bevy_input add documentation on Input (#1781) 2021-04-13 03:13:48 +00:00
bevy_internal Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_log Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_math Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_pbr Rename Light => PointLight and remove unused properties (#1778) 2021-04-13 02:21:24 +00:00
bevy_reflect Override size_hint for all Iterators and add ExactSizeIterator where applicable (#1734) 2021-04-13 01:28:14 +00:00
bevy_render Use a sorted Map for vertex buffer attributes (#1796) 2021-04-13 03:31:29 +00:00
bevy_scene Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_sprite Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_tasks Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_text Update old docs mentioning Camera2dBundle (#1836) 2021-04-06 21:05:08 +00:00
bevy_transform Add synonyms for transform relative vectors (#1667) 2021-04-12 21:53:05 +00:00
bevy_ui Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_utils Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_wgpu Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_window Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_winit Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00