Animating Materials performs poorly sometimes #11537
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
C-Performance
A change motivated by improving speed, memory usage or compile times
P-Regression
Functionality that used to work but no longer does. Add a test for this!
Bevy version
latest main
Relevant system information
Please include:
What's performing poorly?
Updating many materials per frame. Repro by pointing NSight in frame debugger mode at the binary built by
cargo build --example animated_material --release
once #11524 is merged.It looks like material updates are making gargantuan amounts of buffer memory barriers interleaved with coherent buffer copies, but the exact number of them changes per run. Sometimes its way more than others, but always regular per-frame for any given run. Frametime varies, sometimes it hovers around 3.6ms, other times around 12-14ms.
I suspect a system ordering ambiguity may be causing the inconsistency of the performance issue.
A bad run looks like this in NSight:
A good run looks like this:
Notice the amount of orange interleaved vkCmdCopyBuffer + vkCmdPipelineBarriers.
The text was updated successfully, but these errors were encountered: