[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16870] branches/harmonic-skeleton/source/ blender: Bug fixing
Martin Poirier
theeth at yahoo.com
Wed Oct 1 20:00:23 CEST 2008
Revision: 16870
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16870
Author: theeth
Date: 2008-10-01 20:00:13 +0200 (Wed, 01 Oct 2008)
Log Message:
-----------
Bug fixing
It helps if the fonction to wait on all threads actual does that.
Use user parameter for number of threads (this is really looking like it should be in the userprefs and not render params).
Modified Paths:
--------------
branches/harmonic-skeleton/source/blender/blenlib/intern/threads.c
branches/harmonic-skeleton/source/blender/src/autoarmature.c
Modified: branches/harmonic-skeleton/source/blender/blenlib/intern/threads.c
===================================================================
--- branches/harmonic-skeleton/source/blender/blenlib/intern/threads.c 2008-10-01 17:08:51 UTC (rev 16869)
+++ branches/harmonic-skeleton/source/blender/blenlib/intern/threads.c 2008-10-01 18:00:13 UTC (rev 16870)
@@ -225,7 +225,6 @@
tslot->callerdata = NULL;
pthread_join(tslot->pthread, NULL);
tslot->avail = 1;
- break;
}
}
}
Modified: branches/harmonic-skeleton/source/blender/src/autoarmature.c
===================================================================
--- branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-10-01 17:08:51 UTC (rev 16869)
+++ branches/harmonic-skeleton/source/blender/src/autoarmature.c 2008-10-01 18:00:13 UTC (rev 16870)
@@ -78,7 +78,6 @@
struct RigArc;
struct RigEdge;
-#define NB_THREADS 4
#define USE_THREADS
typedef struct RigGraph {
@@ -328,6 +327,8 @@
static RigGraph *newRigGraph()
{
RigGraph *rg;
+ int totthread;
+
rg = MEM_callocN(sizeof(RigGraph), "rig graph");
rg->head = NULL;
@@ -339,7 +340,16 @@
rg->free_node = NULL;
#ifdef USE_THREADS
- rg->worker = BLI_create_worker(exec_retargetArctoArc, NB_THREADS, 20); /* fix number of threads */
+ if(G.scene->r.mode & R_FIXED_THREADS)
+ {
+ totthread = G.scene->r.threads;
+ }
+ else
+ {
+ totthread = BLI_system_thread_count();
+ }
+
+ rg->worker = BLI_create_worker(exec_retargetArctoArc, totthread, 20); /* fix number of threads */
#endif
return rg;
More information about the Bf-blender-cvs
mailing list