Blender Git Commit Log

Git Commits -> Revision 9c010c4

Revision 9c010c4 by Clément Foucault (master)
August 14, 2019, 17:05 (GMT)
Mesh Batch Cache: Refactor + Multithread

For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.

This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).

We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5424

Commit Details:

Full Hash: 9c010c44f4201ab114b3facc69d0343525a1779f
Parent Commit: 45a45f7
Lines Changed: +5337, -4906

2 Added Paths:

/source/blender/draw/intern/draw_cache_extract.h (+249, -0) (View)
/source/blender/draw/intern/draw_cache_extract_mesh.c (+4295, -0) (View)

21 Modified Paths:

/source/blender/blenkernel/BKE_mesh.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/mesh_evaluate.c (+18, -0) (Diff)
/source/blender/blenlib/BLI_math_geom.h (+1, -0) (Diff)
/source/blender/blenlib/intern/math_geom.c (+21, -0) (Diff)
/source/blender/draw/CMakeLists.txt (+2, -0) (Diff)
/source/blender/draw/intern/draw_cache.c (+3, -3) (Diff)
/source/blender/draw/intern/draw_cache_impl.h (+2, -1) (Diff)
/source/blender/draw/intern/draw_cache_impl_mesh.c (+461, -4788) (Diff)
/source/blender/draw/modes/edit_mesh_mode.c (+10, -25) (Diff)
/source/blender/draw/modes/shaders/edit_mesh_overlay_mesh_analysis_frag.glsl (+0, -6) (Diff)
/source/blender/draw/modes/shaders/edit_mesh_overlay_mesh_analysis_vert.glsl (+18, -7) (Diff)
/source/blender/editors/uvedit/uvedit_draw.c (+6, -6) (Diff)
/source/blender/gpu/GPU_batch.h (+2, -1) (Diff)
/source/blender/gpu/GPU_element.h (+18, -1) (Diff)
/source/blender/gpu/GPU_vertex_format.h (+59, -3) (Diff)
/source/blender/gpu/intern/gpu_batch.c (+38, -6) (Diff)
/source/blender/gpu/intern/gpu_element.c (+99, -1) (Diff)
/source/blender/gpu/intern/gpu_vertex_format.c (+23, -55) (Diff)
/source/blender/gpu/intern/gpu_vertex_format_private.h (+1, -0) (Diff)
/source/blender/gpu/shaders/gpu_shader_2D_edituvs_stretch_vert.glsl (+9, -2) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021