diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-29 04:21:03 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-29 15:22:50 +0300 |
commit | f6ad53804099802ab3f5eafa830f95f8545eb888 (patch) | |
tree | b4f00801452c8d14a21deb3f63416d06550c2e5b /source/blender/editors/include | |
parent | ba9c2746b6cf8961f9e3338503c5f0e48feffb22 (diff) |
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.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 6e09318314d..2a0181876c7 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1168,4 +1168,8 @@ void UI_tooltip_free(struct bContext *C, struct bScreen *sc, struct ARegion *ar) int UI_calc_float_precision(int prec, double value); +/* UI Batches managment */ +void ui_widget_batch_preset_reset(void); +void ui_widget_batch_preset_exit(void); + #endif /* __UI_INTERFACE_H__ */ |