more work towards GPU Jacobi solver.
Not fully working yet, GPU version shows explosion at high iteration count.
This commit is contained in:
@@ -111,13 +111,13 @@ void btGpuRigidBodyPipeline::stepSimulation(float deltaTime)
|
||||
btOpenCLArray<btContact4> gpuContacts(m_data->m_context,m_data->m_queue,0,true);
|
||||
gpuContacts.setFromOpenCLBuffer(m_data->m_narrowphase->getContactsGpu(),m_data->m_narrowphase->getNumContactsGpu());
|
||||
|
||||
bool useJacobi = true;
|
||||
bool useJacobi = false;
|
||||
if (useJacobi)
|
||||
{
|
||||
bool useGpu = true;
|
||||
if (useGpu)
|
||||
{
|
||||
bool forceHost = true;
|
||||
bool forceHost = false;
|
||||
if (forceHost)
|
||||
{
|
||||
btAlignedObjectArray<btRigidBodyCL> hostBodies;
|
||||
@@ -133,8 +133,7 @@ void btGpuRigidBodyPipeline::stepSimulation(float deltaTime)
|
||||
|
||||
{
|
||||
btJacobiSolverInfo solverInfo;
|
||||
// m_data->m_solver3->solveGroupHost(&hostBodies[0], &hostInertias[0], hostBodies.size(),&hostContacts[0],hostContacts.size(),0,0,solverInfo);
|
||||
m_data->m_solver3->solveGroupMixedHost(&hostBodies[0], &hostInertias[0], hostBodies.size(),&hostContacts[0],hostContacts.size(),0,0,solverInfo);
|
||||
m_data->m_solver3->solveGroupHost(&hostBodies[0], &hostInertias[0], hostBodies.size(),&hostContacts[0],hostContacts.size(),0,0,solverInfo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user