ParticleOCL demo was sorting out-of-bounds, thanks to igelado for the report

Fixes Issue 515
This commit is contained in:
erwin.coumans
2011-08-30 04:19:26 +00:00
parent 642a6821a5
commit b907018561

View File

@@ -930,7 +930,7 @@ void btParticlesDynamicsWorld::runSortHashKernel()
}
};
btHashPosKey* pHash = (btHashPosKey*)(&m_hPosHash[0]);
pHash->quickSort(pHash, 0, m_numParticles );
pHash->quickSort(pHash, 0, m_numParticles-1 );
// pHash->bitonicSort(pHash, 0, m_hashSize, true);
// write back to GPU
ciErrNum = clEnqueueWriteBuffer(m_cqCommandQue, m_dPosHash, CL_TRUE, 0, memSize, &(m_hPosHash[0]), 0, NULL, NULL);