added a variation of the constraint solver, that works on CPU OpenCL (oneBigBatch), one stage (batching) happens on CPU for this mode

This commit is contained in:
erwin coumans
2013-11-20 22:54:04 -08:00
committed by erwincoumans
parent 1d5c651753
commit 8a7ad65177
9 changed files with 352 additions and 141 deletions

View File

@@ -39,6 +39,7 @@ enum
B3_SOLVER_N_SPLIT_Z = 8,//,
B3_SOLVER_N_CELLS = B3_SOLVER_N_SPLIT_X*B3_SOLVER_N_SPLIT_Y*B3_SOLVER_N_SPLIT_Z,
B3_SOLVER_N_BATCHES = 8,//4,//8,//4,
B3_MAX_NUM_BATCHES = 128,
};
class b3SolverBase
@@ -106,7 +107,7 @@ class b3Solver : public b3SolverBase
b3OpenCLArray<b3GpuConstraint4>* constraint, void* additionalData, int n ,int maxNumBatches);
void solveContactConstraintHost( b3OpenCLArray<b3RigidBodyCL>* bodyBuf, b3OpenCLArray<b3InertiaCL>* shapeBuf,
b3OpenCLArray<b3GpuConstraint4>* constraint, void* additionalData, int n ,int maxNumBatches);
b3OpenCLArray<b3GpuConstraint4>* constraint, void* additionalData, int n ,int maxNumBatches, b3AlignedObjectArray<int>* batchSizes);
void convertToConstraints( const b3OpenCLArray<b3RigidBodyCL>* bodyBuf,