mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
expose the gUseLargeBatches as command-line argument --use_large_batches
This commit is contained in:
parent
8a7ad65177
commit
beb9e98cd3
@ -59,6 +59,7 @@ extern float shadowMapWidth;
|
||||
extern float shadowMapHeight;
|
||||
extern bool gDebugLauncherCL;
|
||||
extern bool gAllowCpuOpenCL;
|
||||
extern bool gUseLargeBatches;
|
||||
|
||||
extern bool gDebugForceLoadingFromSource;
|
||||
extern bool gDebugSkipLoadingBinary;
|
||||
@ -633,7 +634,7 @@ int main(int argc, char* argv[])
|
||||
args.GetCmdLineArgument("cl_device", ci.preferredOpenCLDeviceIndex);
|
||||
args.GetCmdLineArgument("cl_platform", ci.preferredOpenCLPlatformIndex);
|
||||
gAllowCpuOpenCL = args.CheckCmdLineFlag("allow_opencl_cpu");
|
||||
|
||||
gUseLargeBatches = args.CheckCmdLineFlag("use_large_batches");
|
||||
|
||||
gUseJacobi = args.CheckCmdLineFlag("use_jacobi");
|
||||
gUseDbvt = args.CheckCmdLineFlag("use_dbvt");
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
bool oneBigBatch = true;
|
||||
bool gUseLargeBatches = false;
|
||||
bool gCpuBatchContacts = false;
|
||||
bool gCpuSolveConstraint = false;
|
||||
bool gCpuRadixSort=false;
|
||||
@ -771,7 +771,7 @@ void b3GpuPgsContactSolver::solveContacts(int numBodies, cl_mem bodyBuf, cl_mem
|
||||
|
||||
int maxNumBatches = 0;
|
||||
|
||||
if (!oneBigBatch)
|
||||
if (!gUseLargeBatches)
|
||||
{
|
||||
|
||||
if( m_data->m_solverGPU->m_contactBuffer2)
|
||||
@ -1064,7 +1064,7 @@ void b3GpuPgsContactSolver::solveContacts(int numBodies, cl_mem bodyBuf, cl_mem
|
||||
|
||||
int numNonzeroGrid=0;
|
||||
|
||||
if (oneBigBatch)
|
||||
if (gUseLargeBatches)
|
||||
{
|
||||
m_data->m_batchSizes.resize(B3_MAX_NUM_BATCHES);
|
||||
int totalNumConstraints = cpuContacts.size();
|
||||
@ -1125,7 +1125,7 @@ void b3GpuPgsContactSolver::solveContacts(int numBodies, cl_mem bodyBuf, cl_mem
|
||||
|
||||
//printf("maxNumBatches = %d\n", maxNumBatches);
|
||||
|
||||
if (oneBigBatch)
|
||||
if (gUseLargeBatches)
|
||||
{
|
||||
if (nContacts)
|
||||
{
|
||||
@ -1197,7 +1197,7 @@ void b3GpuPgsContactSolver::solveContacts(int numBodies, cl_mem bodyBuf, cl_mem
|
||||
|
||||
//m_data->m_batchSizesGpu->copyFromHost(m_data->m_batchSizes);
|
||||
|
||||
if (oneBigBatch)
|
||||
if (gUseLargeBatches)
|
||||
{
|
||||
solveContactConstraintBatchSizes(m_data->m_bodyBufferGPU,
|
||||
m_data->m_inertiaBufferGPU,
|
||||
|
Loading…
Reference in New Issue
Block a user