diff options
author | Jeroen Bakker <jbakker> | 2021-06-18 17:09:35 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-06-18 17:10:28 +0300 |
commit | e0f2f07d1e8bff3410edddc235b9c4d61f62c18f (patch) | |
tree | a8a20a0f983235bbed0ec570a7751490177bf221 /source/blender/draw/intern/draw_cache_extract_mesh_private.h | |
parent | 6d73d98fb62df19c03fb665cd37ff214458d7a70 (diff) |
DrawManager: Multithreaded counting of material buckets.
When having multiple materials in a mesh the triangles are sorted based
on material index. This sorting is done single threaded, but needs two
loops over the data. One to count the bucket size and the second one to
add the triangles to the right position in the buckets.
This patch will do the counting in a multithreaded approach that would
speed up the cache creation. It has been measured that this part is the
most blocking part of the cache creation.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11615
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract_mesh_private.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache_extract_mesh_private.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract_mesh_private.h b/source/blender/draw/intern/draw_cache_extract_mesh_private.h index 8f2b9c26577..a258967564b 100644 --- a/source/blender/draw/intern/draw_cache_extract_mesh_private.h +++ b/source/blender/draw/intern/draw_cache_extract_mesh_private.h @@ -38,6 +38,8 @@ extern "C" { #endif +#define MIN_RANGE_LEN 1024 + /* ---------------------------------------------------------------------- */ /** \name Dependencies between buffer and batch * \{ */ |