use int4 for broadphase pair, it allows to store persistent information in the future
(contact cache, applied impulse/warm starting info etc)
This commit is contained in:
@@ -1681,7 +1681,7 @@ void computeContactConvexConvex(
|
||||
}
|
||||
|
||||
|
||||
void GpuSatCollision::computeConvexConvexContactsGPUSAT( const b3OpenCLArray<b3Int2>* pairs, int nPairs,
|
||||
void GpuSatCollision::computeConvexConvexContactsGPUSAT( const b3OpenCLArray<b3Int4>* pairs, int nPairs,
|
||||
const b3OpenCLArray<b3RigidBodyCL>* bodyBuf,
|
||||
b3OpenCLArray<b3Contact4>* contactOut, int& nContacts,
|
||||
int maxContactCapacity,
|
||||
@@ -1719,7 +1719,7 @@ void GpuSatCollision::computeConvexConvexContactsGPUSAT( const b3OpenCLArray<b3I
|
||||
#ifdef CHECK_ON_HOST
|
||||
b3AlignedObjectArray<b3YetAnotherAabb> hostAabbs;
|
||||
clAabbsWS.copyToHost(hostAabbs);
|
||||
b3AlignedObjectArray<b3Int2> hostPairs;
|
||||
b3AlignedObjectArray<b3Int4> hostPairs;
|
||||
pairs->copyToHost(hostPairs);
|
||||
|
||||
b3AlignedObjectArray<b3RigidBodyCL> hostBodyBuf;
|
||||
|
||||
@@ -75,7 +75,7 @@ struct GpuSatCollision
|
||||
virtual ~GpuSatCollision();
|
||||
|
||||
|
||||
void computeConvexConvexContactsGPUSAT( const b3OpenCLArray<b3Int2>* pairs, int nPairs,
|
||||
void computeConvexConvexContactsGPUSAT( const b3OpenCLArray<b3Int4>* pairs, int nPairs,
|
||||
const b3OpenCLArray<b3RigidBodyCL>* bodyBuf,
|
||||
b3OpenCLArray<b3Contact4>* contactOut, int& nContacts,
|
||||
int maxContactCapacity,
|
||||
|
||||
@@ -192,7 +192,7 @@ void quantizeWithClamp(unsigned short* out, float4 point2,int isMax, float4 bvhA
|
||||
|
||||
|
||||
// work-in-progress
|
||||
__kernel void bvhTraversalKernel( __global const int2* pairs,
|
||||
__kernel void bvhTraversalKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global btAabbCL* aabbs,
|
||||
|
||||
@@ -194,7 +194,7 @@ static const char* bvhTraversalKernelCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"// work-in-progress\n"
|
||||
"__kernel void bvhTraversalKernel( __global const int2* pairs, \n"
|
||||
"__kernel void bvhTraversalKernel( __global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global btAabbCL* aabbs,\n"
|
||||
|
||||
@@ -802,7 +802,7 @@ void computeContactPlaneSphere(int pairIndex,
|
||||
}
|
||||
|
||||
|
||||
__kernel void primitiveContactsKernel( __global const int2* pairs,
|
||||
__kernel void primitiveContactsKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global const ConvexPolyhedronCL* convexShapes,
|
||||
|
||||
@@ -804,7 +804,7 @@ static const char* primitiveContactsKernelsCL= \
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void primitiveContactsKernel( __global const int2* pairs, \n"
|
||||
"__kernel void primitiveContactsKernel( __global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
|
||||
@@ -756,7 +756,7 @@ __kernel void processCompoundPairsKernel( __global const int4* gpuCompoundPair
|
||||
}
|
||||
|
||||
// work-in-progress
|
||||
__kernel void findCompoundPairsKernel( __global const int2* pairs,
|
||||
__kernel void findCompoundPairsKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global const ConvexPolyhedronCL* convexShapes,
|
||||
@@ -938,7 +938,7 @@ __kernel void findCompoundPairsKernel( __global const int2* pairs,
|
||||
}
|
||||
|
||||
// work-in-progress
|
||||
__kernel void findSeparatingAxisKernel( __global const int2* pairs,
|
||||
__kernel void findSeparatingAxisKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global const ConvexPolyhedronCL* convexShapes,
|
||||
|
||||
@@ -885,7 +885,7 @@ int extractManifoldSequential(const float4* p, int nPoints, float4 nearNormal, i
|
||||
|
||||
|
||||
|
||||
__kernel void extractManifoldAndAddContactKernel(__global const int2* pairs,
|
||||
__kernel void extractManifoldAndAddContactKernel(__global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const float4* closestPointsWorld,
|
||||
__global const float4* separatingNormalsWorld,
|
||||
@@ -960,7 +960,7 @@ void trMul(float4 translationA, Quaternion orientationA,
|
||||
|
||||
|
||||
|
||||
__kernel void clipHullHullKernel( __global const int2* pairs,
|
||||
__kernel void clipHullHullKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global const ConvexPolyhedronCL* convexShapes,
|
||||
@@ -1192,7 +1192,7 @@ __kernel void clipCompoundsHullHullKernel( __global const int4* gpuCompoundPai
|
||||
|
||||
|
||||
|
||||
__kernel void sphereSphereCollisionKernel( __global const int2* pairs,
|
||||
__kernel void sphereSphereCollisionKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global const float4* separatingNormals,
|
||||
@@ -1677,7 +1677,7 @@ int clipFaces(__global float4* worldVertsA1,
|
||||
|
||||
|
||||
|
||||
__kernel void findClippingFacesKernel( __global const int2* pairs,
|
||||
__kernel void findClippingFacesKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const btCollidableGpu* collidables,
|
||||
__global const ConvexPolyhedronCL* convexShapes,
|
||||
@@ -1740,7 +1740,7 @@ __kernel void findClippingFacesKernel( __global const int2* pairs,
|
||||
|
||||
|
||||
|
||||
__kernel void clipFacesAndContactReductionKernel( __global const int2* pairs,
|
||||
__kernel void clipFacesAndContactReductionKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const float4* separatingNormals,
|
||||
__global const int* hasSeparatingAxis,
|
||||
@@ -1853,7 +1853,7 @@ __kernel void clipFacesAndContactReductionKernel( __global const int2* pairs,
|
||||
|
||||
|
||||
|
||||
__kernel void newContactReductionKernel( __global const int2* pairs,
|
||||
__kernel void newContactReductionKernel( __global const int4* pairs,
|
||||
__global const BodyData* rigidBodies,
|
||||
__global const float4* separatingNormals,
|
||||
__global const int* hasSeparatingAxis,
|
||||
|
||||
@@ -887,7 +887,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void extractManifoldAndAddContactKernel(__global const int2* pairs, \n"
|
||||
"__kernel void extractManifoldAndAddContactKernel(__global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const float4* closestPointsWorld,\n"
|
||||
" __global const float4* separatingNormalsWorld,\n"
|
||||
@@ -962,7 +962,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void clipHullHullKernel( __global const int2* pairs, \n"
|
||||
"__kernel void clipHullHullKernel( __global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
@@ -1194,7 +1194,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void sphereSphereCollisionKernel( __global const int2* pairs, \n"
|
||||
"__kernel void sphereSphereCollisionKernel( __global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
@@ -1679,7 +1679,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void findClippingFacesKernel( __global const int2* pairs,\n"
|
||||
"__kernel void findClippingFacesKernel( __global const int4* pairs,\n"
|
||||
" __global const BodyData* rigidBodies,\n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes,\n"
|
||||
@@ -1742,7 +1742,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void clipFacesAndContactReductionKernel( __global const int2* pairs,\n"
|
||||
"__kernel void clipFacesAndContactReductionKernel( __global const int4* pairs,\n"
|
||||
" __global const BodyData* rigidBodies,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
" __global const int* hasSeparatingAxis,\n"
|
||||
@@ -1855,7 +1855,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"__kernel void newContactReductionKernel( __global const int2* pairs,\n"
|
||||
"__kernel void newContactReductionKernel( __global const int4* pairs,\n"
|
||||
" __global const BodyData* rigidBodies,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
" __global const int* hasSeparatingAxis,\n"
|
||||
|
||||
@@ -758,7 +758,7 @@ static const char* satKernelsCL= \
|
||||
"}\n"
|
||||
"\n"
|
||||
"// work-in-progress\n"
|
||||
"__kernel void findCompoundPairsKernel( __global const int2* pairs, \n"
|
||||
"__kernel void findCompoundPairsKernel( __global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
@@ -940,7 +940,7 @@ static const char* satKernelsCL= \
|
||||
"}\n"
|
||||
"\n"
|
||||
"// work-in-progress\n"
|
||||
"__kernel void findSeparatingAxisKernel( __global const int2* pairs, \n"
|
||||
"__kernel void findSeparatingAxisKernel( __global const int4* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
|
||||
Reference in New Issue
Block a user