b3Solver -> pass pointer to source instead of 0 (was left over from a debugging session), thanks to David for the report
Break up clipHullHullConcaveConvexKernel into multiple stages, so it might 'fit' in Apple's OpenCL implementation Implemented bvhTraversalKernel and findConcaveSeparatingAxis on CPU (debugging, possible future CPU version)
This commit is contained in:
@@ -40,6 +40,7 @@ static const char* satClipKernelsCL= \
|
||||
"#ifdef __cplusplus\n"
|
||||
"#else\n"
|
||||
"#define b3AtomicInc atomic_inc\n"
|
||||
"#define b3AtomicAdd atomic_add\n"
|
||||
"#define b3Fabs fabs\n"
|
||||
"#define b3Sqrt native_sqrt\n"
|
||||
"#define b3Sin native_sin\n"
|
||||
@@ -63,6 +64,9 @@ static const char* satClipKernelsCL= \
|
||||
" float4 b1 = b3MakeFloat4(v1.xyz,0.f);\n"
|
||||
" return cross(a1, b1);\n"
|
||||
" }\n"
|
||||
" #define b3MinFloat4 min\n"
|
||||
" #define b3MaxFloat4 max\n"
|
||||
" #define b3Normalized(a) normalize(a)\n"
|
||||
"#endif \n"
|
||||
" \n"
|
||||
"inline bool b3IsAlmostZero(b3Float4ConstArg v)\n"
|
||||
@@ -1859,9 +1863,7 @@ static const char* satClipKernelsCL= \
|
||||
" }// if (i<numPairs)\n"
|
||||
" \n"
|
||||
"}\n"
|
||||
"__kernel void clipFacesAndFindContactsKernel( __global int4* pairs,\n"
|
||||
" __global const b3RigidBodyData_t* rigidBodies,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
"__kernel void clipFacesAndFindContactsKernel( __global const float4* separatingNormals,\n"
|
||||
" __global const int* hasSeparatingAxis,\n"
|
||||
" __global struct b3Contact4Data* globalContactsOut,\n"
|
||||
" __global int4* clippingFacesOut,\n"
|
||||
@@ -1888,8 +1890,8 @@ static const char* satClipKernelsCL= \
|
||||
" if (hasSeparatingAxis[i])\n"
|
||||
" {\n"
|
||||
" \n"
|
||||
" int bodyIndexA = pairs[i].x;\n"
|
||||
" int bodyIndexB = pairs[i].y;\n"
|
||||
"// int bodyIndexA = pairs[i].x;\n"
|
||||
" // int bodyIndexB = pairs[i].y;\n"
|
||||
" \n"
|
||||
" int numLocalContactsOut = 0;\n"
|
||||
" int capacityWorldVertsB2 = vertexFaceCapacity;\n"
|
||||
|
||||
Reference in New Issue
Block a user