diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-07-28 13:47:32 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-07-28 13:47:32 +0400 |
commit | 115458b53e5e98ee6bc8cd97fcc38cdc51f89df7 (patch) | |
tree | 9b580392ccafe1b8031061797571ff1c582d3fbd /source/blender/editors/sculpt_paint/sculpt_intern.h | |
parent | 82ceab593cc122ef226bb945ff8e9719016ca525 (diff) |
Fix T41193: 2.71 use 100% of CPU at sculpt
Issue wascaused by the famous OpenMP crap in MSVC2013,
so only way is to use openmp threading if number of BVH
nodes is high enough.
Made it 8 for now, which seems to work rather fine on my
laptop and adult dragon from sintel. But maybe it's to be
adjusted a bit more.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index cd79f525d82..248fc78715e 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -130,4 +130,11 @@ void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]); void sculpt_update_object_bounding_box(struct Object *ob); +/* Setting zero so we can catch bugs in OpenMP/sculpt. */ +#ifdef DEBUG +# define SCULPT_OMP_LIMIT 0 +#else +# define SCULPT_OMP_LIMIT 8 +#endif + #endif |