diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-04-06 02:55:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-04-06 02:55:21 +0300 |
commit | f12040e088b66748340b0d7472d1155596e0f9e2 (patch) | |
tree | 3dad1692582642c3c3e9f4c867695bc8d8a1b776 /source/blender/draw/CMakeLists.txt | |
parent | 542725d3e97314019ec065beaa54a30793a4a613 (diff) |
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.
Diffstat (limited to 'source/blender/draw/CMakeLists.txt')
-rw-r--r-- | source/blender/draw/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index aea08f87a84..3ac606fc48f 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -41,6 +41,7 @@ set(INC ../../../intern/glew-mx ../../../intern/guardedalloc + ../../../intern/atomic ) set(INC_SYS |