Search Issue Tracker
By Design
Votes
4
Found in [Package]
1.0.0-preview.17
Issue ID
1368424
Regression
No
[UIR] Batches and Verts increase when hovering over buttons
Reproduction steps:
1. Open the user's attached project "Bug report.zip"
2. Open Assets > Scenes > test
3. Enter play mode
4. Open the "Stats" window
5. Hover your mouse on buttons and observe batches and verts in the Statistics window
Expected results: Batches and Verts stay the same when hovering over buttons
Actual results: Batches and Verts increases when hovering over buttons
Reproduced in: 1.0.0-preview.17 (2020.3.19f1, 2021.1.23f1, 2021.2.0b14, 2022.1.0a11)
Could not test with: 2019.4.31f1 (UI Toolkit is not introduced yet)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
Resolution Note:
Using transition on "all" properties with that amount of styles causes geometry to be regenerated each frame. Because the previous geometry may still be used by the render thread, we cannot touch it right away, and we allocate the geometry to another range in memory.
Having an "out of order" section in a render buffer is not breaking a batch in itself, but with the provided examples, the two first pages are close to be full to begin with. A third page is allocated for the geometry, and draw calls between pages do break batches as they are changing the GPU configuration and are way more expensive.
We intend on exposing control over the pages sizes and some allocation/defragmentation behaviors on the long run, as this would allow optimizing situation such as the one encountered.
For the time being, the allocations could be omitted if the transition occurs only on some properties. The transform (translate, rotate, scale) and colors usually are accelerated and don't need any geometry changes. Every changes that would affect the layout would guarantee some allocation at this moment (width, flex values, text size).