add bitonic sort, as comparison.
fix stringify.bat for Windows (need to fix Mac/Linux version too)
This commit is contained in:
@@ -55,7 +55,7 @@ static const char* satClipKernelsCL= \
|
||||
"} Contact4;\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"///keep this in sync with b3Collidable.h\n"
|
||||
"///keep this in sync with btCollidable.h\n"
|
||||
"typedef struct\n"
|
||||
"{\n"
|
||||
" int m_numChildShapes;\n"
|
||||
@@ -63,7 +63,7 @@ static const char* satClipKernelsCL= \
|
||||
" int m_shapeType;\n"
|
||||
" int m_shapeIndex;\n"
|
||||
" \n"
|
||||
"} b3CollidableGpu;\n"
|
||||
"} btCollidableGpu;\n"
|
||||
"\n"
|
||||
"typedef struct\n"
|
||||
"{\n"
|
||||
@@ -73,7 +73,7 @@ static const char* satClipKernelsCL= \
|
||||
" int m_unused0;\n"
|
||||
" int m_unused1;\n"
|
||||
" int m_unused2;\n"
|
||||
"} b3GpuChildShape;\n"
|
||||
"} btGpuChildShape;\n"
|
||||
"\n"
|
||||
"#define GET_NPOINTS(x) (x).m_worldNormal.w\n"
|
||||
"\n"
|
||||
@@ -115,7 +115,7 @@ static const char* satClipKernelsCL= \
|
||||
" float4 m_plane;\n"
|
||||
" int m_indexOffset;\n"
|
||||
" int m_numIndices;\n"
|
||||
"} b3GpuFace;\n"
|
||||
"} btGpuFace;\n"
|
||||
"\n"
|
||||
"#define SELECT_UINT4( b, a, condition ) select( b,a,condition )\n"
|
||||
"\n"
|
||||
@@ -357,7 +357,7 @@ static const char* satClipKernelsCL= \
|
||||
" float4* worldVertsB2, int capacityWorldVertsB2,\n"
|
||||
" const float minDist, float maxDist,\n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" float4* contactsOut,\n"
|
||||
" int contactCapacity)\n"
|
||||
@@ -392,7 +392,7 @@ static const char* satClipKernelsCL= \
|
||||
" if (closestFaceA<0)\n"
|
||||
" return numContactsOut;\n"
|
||||
"\n"
|
||||
" b3GpuFace polyA = faces[hullA->m_faceOffset+closestFaceA];\n"
|
||||
" btGpuFace polyA = faces[hullA->m_faceOffset+closestFaceA];\n"
|
||||
"\n"
|
||||
" // clip polygon to back of planes of all faces of hull A that are adjacent to witness face\n"
|
||||
" int numVerticesA = polyA.m_numIndices;\n"
|
||||
@@ -416,7 +416,7 @@ static const char* satClipKernelsCL= \
|
||||
" //clipFace(*pVtxIn, *pVtxOut,planeNormalWS,planeEqWS);\n"
|
||||
" numVertsOut = clipFace(pVtxIn, numVertsIn, planeNormalWS,planeEqWS, pVtxOut);\n"
|
||||
"\n"
|
||||
" //b3Swap(pVtxIn,pVtxOut);\n"
|
||||
" //btSwap(pVtxIn,pVtxOut);\n"
|
||||
" float4* tmp = pVtxOut;\n"
|
||||
" pVtxOut = pVtxIn;\n"
|
||||
" pVtxIn = tmp;\n"
|
||||
@@ -458,10 +458,10 @@ static const char* satClipKernelsCL= \
|
||||
" float4* worldVertsB2, int capacityWorldVertsB2,\n"
|
||||
" const float minDist, float maxDist,\n"
|
||||
" const float4* verticesA,\n"
|
||||
" const b3GpuFace* facesA,\n"
|
||||
" const btGpuFace* facesA,\n"
|
||||
" const int* indicesA,\n"
|
||||
" __global const float4* verticesB,\n"
|
||||
" __global const b3GpuFace* facesB,\n"
|
||||
" __global const btGpuFace* facesB,\n"
|
||||
" __global const int* indicesB,\n"
|
||||
" float4* contactsOut,\n"
|
||||
" int contactCapacity)\n"
|
||||
@@ -496,7 +496,7 @@ static const char* satClipKernelsCL= \
|
||||
" if (closestFaceA<0)\n"
|
||||
" return numContactsOut;\n"
|
||||
"\n"
|
||||
" b3GpuFace polyA = facesA[hullA->m_faceOffset+closestFaceA];\n"
|
||||
" btGpuFace polyA = facesA[hullA->m_faceOffset+closestFaceA];\n"
|
||||
"\n"
|
||||
" // clip polygon to back of planes of all faces of hull A that are adjacent to witness face\n"
|
||||
" int numVerticesA = polyA.m_numIndices;\n"
|
||||
@@ -520,7 +520,7 @@ static const char* satClipKernelsCL= \
|
||||
" //clipFace(*pVtxIn, *pVtxOut,planeNormalWS,planeEqWS);\n"
|
||||
" numVertsOut = clipFace(pVtxIn, numVertsIn, planeNormalWS,planeEqWS, pVtxOut);\n"
|
||||
"\n"
|
||||
" //b3Swap(pVtxIn,pVtxOut);\n"
|
||||
" //btSwap(pVtxIn,pVtxOut);\n"
|
||||
" float4* tmp = pVtxOut;\n"
|
||||
" pVtxOut = pVtxIn;\n"
|
||||
" pVtxIn = tmp;\n"
|
||||
@@ -561,7 +561,7 @@ static const char* satClipKernelsCL= \
|
||||
" float4* worldVertsB1, float4* worldVertsB2, int capacityWorldVerts,\n"
|
||||
" const float minDist, float maxDist,\n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" float4* localContactsOut,\n"
|
||||
" int localContactCapacity)\n"
|
||||
@@ -589,7 +589,7 @@ static const char* satClipKernelsCL= \
|
||||
" }\n"
|
||||
"\n"
|
||||
" {\n"
|
||||
" const b3GpuFace polyB = faces[hullB->m_faceOffset+closestFaceB];\n"
|
||||
" const btGpuFace polyB = faces[hullB->m_faceOffset+closestFaceB];\n"
|
||||
" const int numVertices = polyB.m_numIndices;\n"
|
||||
" for(int e0=0;e0<numVertices;e0++)\n"
|
||||
" {\n"
|
||||
@@ -617,10 +617,10 @@ static const char* satClipKernelsCL= \
|
||||
" float4* worldVertsB1, float4* worldVertsB2, int capacityWorldVerts,\n"
|
||||
" const float minDist, float maxDist,\n"
|
||||
" const float4* verticesA,\n"
|
||||
" const b3GpuFace* facesA,\n"
|
||||
" const btGpuFace* facesA,\n"
|
||||
" const int* indicesA,\n"
|
||||
" __global const float4* verticesB,\n"
|
||||
" __global const b3GpuFace* facesB,\n"
|
||||
" __global const btGpuFace* facesB,\n"
|
||||
" __global const int* indicesB,\n"
|
||||
" float4* localContactsOut,\n"
|
||||
" int localContactCapacity)\n"
|
||||
@@ -648,7 +648,7 @@ static const char* satClipKernelsCL= \
|
||||
" }\n"
|
||||
"\n"
|
||||
" {\n"
|
||||
" const b3GpuFace polyB = facesB[hullB->m_faceOffset+closestFaceB];\n"
|
||||
" const btGpuFace polyB = facesB[hullB->m_faceOffset+closestFaceB];\n"
|
||||
" const int numVertices = polyB.m_numIndices;\n"
|
||||
" for(int e0=0;e0<numVertices;e0++)\n"
|
||||
" {\n"
|
||||
@@ -956,11 +956,11 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"__kernel void clipHullHullKernel( __global const int2* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const b3CollidableGpu* collidables,\n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const float4* uniqueEdges,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
" __global const int* hasSeparatingAxis,\n"
|
||||
@@ -1053,13 +1053,13 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"__kernel void clipCompoundsHullHullKernel( __global const int4* gpuCompoundPairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const b3CollidableGpu* collidables,\n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const float4* uniqueEdges,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" __global const b3GpuChildShape* gpuChildShapes,\n"
|
||||
" __global const btGpuChildShape* gpuChildShapes,\n"
|
||||
" __global const float4* gpuCompoundSepNormalsOut,\n"
|
||||
" __global const int* gpuHasCompoundSepNormalsOut,\n"
|
||||
" __global Contact4* restrict globalContactsOut,\n"
|
||||
@@ -1185,7 +1185,7 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"__kernel void sphereSphereCollisionKernel( __global const int2* pairs, \n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const b3CollidableGpu* collidables,\n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
" __global const int* hasSeparatingAxis,\n"
|
||||
" __global Contact4* restrict globalContactsOut,\n"
|
||||
@@ -1252,13 +1252,13 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"__kernel void clipHullHullConcaveConvexKernel( __global int4* concavePairsIn,\n"
|
||||
" __global const BodyData* rigidBodies, \n"
|
||||
" __global const b3CollidableGpu* collidables,\n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes, \n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const float4* uniqueEdges,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" __global const b3GpuChildShape* gpuChildShapes,\n"
|
||||
" __global const btGpuChildShape* gpuChildShapes,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
" __global Contact4* restrict globalContactsOut,\n"
|
||||
" counter32_t nGlobalContactsOut,\n"
|
||||
@@ -1306,7 +1306,7 @@ static const char* satClipKernelsCL= \
|
||||
" convexPolyhedronA.m_vertexOffset = 0;\n"
|
||||
" float4 localCenter = make_float4(0.f,0.f,0.f,0.f);\n"
|
||||
"\n"
|
||||
" b3GpuFace face = faces[convexShapes[shapeIndexA].m_faceOffset+f];\n"
|
||||
" btGpuFace face = faces[convexShapes[shapeIndexA].m_faceOffset+f];\n"
|
||||
" \n"
|
||||
" float4 verticesA[3];\n"
|
||||
" for (int i=0;i<3;i++)\n"
|
||||
@@ -1335,7 +1335,7 @@ static const char* satClipKernelsCL= \
|
||||
" \n"
|
||||
" float4 normal = make_float4(face.m_plane.x,face.m_plane.y,face.m_plane.z,0.f);\n"
|
||||
" \n"
|
||||
" b3GpuFace facesA[TRIANGLE_NUM_CONVEX_FACES];\n"
|
||||
" btGpuFace facesA[TRIANGLE_NUM_CONVEX_FACES];\n"
|
||||
" int indicesA[3+3+2+2+2];\n"
|
||||
" int curUsedIndices=0;\n"
|
||||
" int fidx=0;\n"
|
||||
@@ -1496,7 +1496,7 @@ static const char* satClipKernelsCL= \
|
||||
" int capacityWorldVerts,\n"
|
||||
" const float minDist, float maxDist,\n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" __global int4* clippingFaces, int pairIndex)\n"
|
||||
"{\n"
|
||||
@@ -1523,7 +1523,7 @@ static const char* satClipKernelsCL= \
|
||||
" }\n"
|
||||
" \n"
|
||||
" {\n"
|
||||
" const b3GpuFace polyB = faces[hullB->m_faceOffset+closestFaceB];\n"
|
||||
" const btGpuFace polyB = faces[hullB->m_faceOffset+closestFaceB];\n"
|
||||
" const int numVertices = polyB.m_numIndices;\n"
|
||||
" for(int e0=0;e0<numVertices;e0++)\n"
|
||||
" {\n"
|
||||
@@ -1664,11 +1664,11 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"__kernel void findClippingFacesKernel( __global const int2* pairs,\n"
|
||||
" __global const BodyData* rigidBodies,\n"
|
||||
" __global const b3CollidableGpu* collidables,\n"
|
||||
" __global const btCollidableGpu* collidables,\n"
|
||||
" __global const ConvexPolyhedronCL* convexShapes,\n"
|
||||
" __global const float4* vertices,\n"
|
||||
" __global const float4* uniqueEdges,\n"
|
||||
" __global const b3GpuFace* faces,\n"
|
||||
" __global const btGpuFace* faces,\n"
|
||||
" __global const int* indices,\n"
|
||||
" __global const float4* separatingNormals,\n"
|
||||
" __global const int* hasSeparatingAxis,\n"
|
||||
|
||||
Reference in New Issue
Block a user