Re-introduce GPU parallel Jacobi solver, called btGpuJacobiContactSolver. There are still some issues, but for basic scene's it works.

To avoid confusion, rename GPU contact solver to btGpuContactSolver, and constraint (non-contact) solver to btPgsConstraintSolver.
This commit is contained in:
erwincoumans
2013-11-11 21:15:06 -08:00
parent ef6be5370d
commit 5ce0b3938f
19 changed files with 1557 additions and 58 deletions

View File

@@ -358,6 +358,8 @@ typedef struct
float m_frictionCoeff;
} Body;
typedef struct
{
Matrix3x3 m_invInertia;
@@ -385,6 +387,8 @@ typedef struct
__kernel void CountBodiesKernel(__global struct b3Contact4Data* manifoldPtr, __global unsigned int* bodyCount, __global int2* contactConstraintOffsets, int numContactManifolds, int fixedBodyIndex)
{
int i = GET_GLOBAL_IDX;
@@ -527,7 +531,7 @@ void solveContact(__global Constraint4* cs,
float4 angular0, angular1, linear;
float4 r0 = cs->m_worldPos[ic] - posA;
float4 r1 = cs->m_worldPos[ic] - posB;
setLinearAndAngular( -cs->m_linear, r0, r1, &linear, &angular0, &angular1 );
setLinearAndAngular( cs->m_linear, r0, r1, &linear, &angular0, &angular1 );