-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecesssary values Vec from DynamicUniformBuffer and DynamicS…
…torageBuffer (#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`.
- Loading branch information
Showing
2 changed files
with
12 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters