Blender Git Loki

Git Commits -> Revision f12040e

Revision f12040e by Clément Foucault (master)
April 5, 2019, 23:55 (GMT)
DRW: Opti: Fix hotspot in DRW_mesh_batch_cache_get_surface_shaded

The hotspot was generated by mesh_cd_layers_type_overlap who was testing
way more data than it should have.

Here we reduce the whole CD layer mask to a 32bit bitflag that is easily
or'ed and tested.

Bonus point: We use atomic operation to merge the mask in order to allow
future multi-threading. (this was a TODO)

In the scene attached to T58188 this removes 5% of CPU time.

Commit Details:

Full Hash: f12040e088b66748340b0d7472d1155596e0f9e2
Parent Commit: 542725d
Lines Changed: +104, -136

2 Modified Paths:

/source/blender/draw/CMakeLists.txt (+1, -0) (Diff)
/source/blender/draw/intern/draw_cache_impl_mesh.c (+103, -136) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021