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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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).