Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-08 17:23:17 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-08 17:23:17 +0400
commita07dcd67ebf63fad08536b1e78bbb61e18fa51e6 (patch)
tree7c96f23349f005187e87d19d23248bb40d4d2e91 /source/blender/blenkernel/intern/softbody.c
parent3e763d7e4dbbc4acb3deb7afb95e936ce950ebb5 (diff)
Fix #35240: command line -t number of threads option did not work for cycles.
Now it works for blender internal, cycles and other multithreading code in Blender in both background and UI mode.
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r--source/blender/blenkernel/intern/softbody.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index d600b82522d..5011080234e 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -79,6 +79,7 @@ variables on the UI for now
#include "BKE_pointcache.h"
#include "BKE_deform.h"
#include "BKE_mesh.h"
+#include "BKE_scene.h"
#include "PIL_time.h"
// #include "ONL_opennl.h" remove linking to ONL for now
@@ -1664,10 +1665,7 @@ static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,
do_effector= pdInitEffectors(scene, ob, NULL, ob->soft->effector_weights);
/* figure the number of threads while preventing pretty pointless threading overhead */
- if (scene->r.mode & R_FIXED_THREADS)
- totthread= scene->r.threads;
- else
- totthread= BLI_system_thread_count();
+ totthread= BKE_scene_num_threads(scene);
/* what if we got zillions of CPUs running but less to spread*/
while ((totsprings/totthread < lowsprings) && (totthread > 1)) {
totthread--;
@@ -2395,10 +2393,7 @@ static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float t
int lowpoints =100; /* wild guess .. may increase with better thread management 'above' or even be UI option sb->spawn_cf_threads_nopts */
/* figure the number of threads while preventing pretty pointless threading overhead */
- if (scene->r.mode & R_FIXED_THREADS)
- totthread= scene->r.threads;
- else
- totthread= BLI_system_thread_count();
+ totthread= BKE_scene_num_threads(scene);
/* what if we got zillions of CPUs running but less to spread*/
while ((totpoint/totthread < lowpoints) && (totthread > 1)) {
totthread--;