Blender Git Commit Log

Git Commits -> Revision f6ad538

Revision f6ad538 by Clément Foucault (master)
March 29, 2018, 12:22 (GMT)
UI: Perf: widgetbase: Replace imm usage by a batch cache.

Introduce a UI batch cache. For the moment it's only used by widgetbase so
leaving it interface_widgets.c. If it grows, it can have its own file.

Like all preset batches (batches used by UI context), vaos must be refreshed
each time a new window context is binded.

This still does 3 GWN_batch_draw in the worst cases but at least it does
not use the IMM api.

I will continue and batch the 3 calls together since we are really CPU
bound, so shader complexity does not really matters.

I cannot spot any difference on all the widgets I could test. I did not use
any unit tests so I cannot tell if there is really any defects.

This is not a complete rewrite but it adresses the top bottleneck found
after a profilling session.

Commit Details:

Full Hash: f6ad53804099802ab3f5eafa830f95f8545eb888
Parent Commit: ba9c274
Lines Changed: +188, -94

3 Modified Paths:

/source/blender/editors/include/UI_interface.h (+4, -0) (Diff)
/source/blender/editors/interface/interface_widgets.c (+178, -94) (Diff)
/source/blender/gpu/intern/gpu_batch_presets.c (+6, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021