bevy/crates/bevy_render
James Liu 63d89d31ba
Remove unnecesssary values Vec from DynamicUniformBuffer and DynamicStorageBuffer (#8299)
# Objective
Fixes #8284. `values` is being pushed to separately from the actual
scratch buffer in `DynamicUniformBuffer::push` and
`DynamicStorageBuffer::push`. In both types, `values` is really only
used to track the number of elements being added to the buffer, yet is
causing extra allocations, size increments and excess copies.

## Solution
Remove it and its remaining uses. Replace it with accesses to `scratch`
instead.

I removed the `len` accessor, as it may be non-trivial to compute just
from `scratch`. If this is still desirable to have, we can keep a `len`
member field to track it instead of relying on `scratch`.
2023-04-04 20:12:19 +00:00
..
macros chore: Release (#7920) 2023-03-06 05:13:36 +00:00
src Remove unnecesssary values Vec from DynamicUniformBuffer and DynamicStorageBuffer (#8299) 2023-04-04 20:12:19 +00:00
Cargo.toml Added WebP image format support (#8220) 2023-03-28 19:53:55 +00:00