Blender Git Commit Log
Git Commits -> Revision 001f7c9
Revision 001f7c9 by Germano Cavalcante (master) February 24, 2020, 11:01 (GMT) |
BLF: Optimize text rendering and caching The current code allocates and transfers a lot of memory to the GPU, but only a small portion of this memory is actually used. In addition, the code calls many costly gl operations during the caching process. This commit significantly reduce the amount of memory by allocating and transferring a flat array without pads to the GPU. It also calls as little as possible the gl operations during the cache. This code also simulate a billinear filter `GL_LINEAR` using a 1D texture. **Average drawing time:** |before:|0.00003184 sec |now:|0.00001943 sec |fac:|1.6385156675048407 **5 worst times:** |before:|[0.001075, 0.001433, 0.002143, 0.002915, 0.003242] |now:|[0.00094, 0.000993, 0.001502, 0.002284, 0.002328] Differential Revision: https://developer.blender.org/D6886 |
Commit Details:
Full Hash: 001f7c92d1452e01622f066d37bd42545b650a27
Parent Commit: a31bd3f
Lines Changed: +242, -231
6 Modified Paths:
/source/blender/blenfont/intern/blf.c (+0, -3) (Diff)
/source/blender/blenfont/intern/blf_font.c (+49, -4) (Diff)
/source/blender/blenfont/intern/blf_glyph.c (+78, -152) (Diff)
/source/blender/blenfont/intern/blf_internal_types.h (+10, -37) (Diff)
/source/blender/gpu/shaders/gpu_shader_text_frag.glsl (+88, -31) (Diff)
/source/blender/gpu/shaders/gpu_shader_text_vert.glsl (+17, -4) (Diff)
/source/blender/blenfont/intern/blf_font.c (+49, -4) (Diff)
/source/blender/blenfont/intern/blf_glyph.c (+78, -152) (Diff)
/source/blender/blenfont/intern/blf_internal_types.h (+10, -37) (Diff)
/source/blender/gpu/shaders/gpu_shader_text_frag.glsl (+88, -31) (Diff)
/source/blender/gpu/shaders/gpu_shader_text_vert.glsl (+17, -4) (Diff)