Blender Git Commit Log

Git Commits -> Revision 178086d

Revision 178086d by Germano Cavalcante (master)
July 21, 2021, 18:09 (GMT)
Draw Cache: extract tris in parallel ranges

The `ibo.tris` extraction in multithread is currently only done if the
mesh has only 1 material.

Now we cache a map indicating the index of each polygon after sort and
thus allow the extraction of tris with materials in multithreaded.

As caching is a heavy operation and was already being performed in
multi-thread for triangle offsets, no significant improvements are
expected.

The benefit will be much greater when we can skip updating the cache
while transforming a geometry.

**Profiling:**
||master:|PATCH:
|---|---|---|
|large_mesh_editing_materials:|Average: 13.855380 FPS|Average: 15.525684 FPS
||rdata 9ms iter 36ms (frame 71ms)|rdata 9ms iter 29ms (frame 64ms)
|subdiv_mesh_final_only_materials:|Average: 28.113742 FPS|Average: 28.633599 FPS
||rdata 0ms iter 1ms (frame 36ms)|rdata 0ms iter 1ms (frame 35ms)

1.1x overall speedup

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

Commit Details:

Full Hash: 178086d5810a0de9e1d95c7fbd6c443cd53af40d
Parent Commit: 785d87e
Lines Changed: +189, -176

6 Modified Paths:

/source/blender/draw/intern/draw_cache_extract.h (+5, -5) (Diff)
/source/blender/draw/intern/draw_cache_extract_mesh.cc (+1, -1) (Diff)
/source/blender/draw/intern/draw_cache_extract_mesh_private.h (+7, -5) (Diff)
/source/blender/draw/intern/draw_cache_extract_mesh_render_data.c (+116, -112) (Diff)
/source/blender/draw/intern/draw_cache_impl_mesh.c (+3, -1) (Diff)
/source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_tris.cc (+57, -52) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021