added (and stripped) a simple C/C++ preprocessor (written in Lua), so the stringifier can handle the #include directive,
and embed the included files directly in the stringified files. We need this, because we start sharing struct definitions and code between C/C++ and OpenCL (and potentially other languages) preprocessor is from http://github.com/willsteel/lcpp
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
//this file is autogenerated using stringify.bat (premake --stringify) in the build folder of this project
|
||||
static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"#define TRIANGLE_NUM_CONVEX_FACES 5\n"
|
||||
"\n"
|
||||
"#define SHAPE_CONVEX_HULL 3\n"
|
||||
@@ -47,15 +46,15 @@ static const char* satClipKernelsCL= \
|
||||
"{\n"
|
||||
" float4 m_worldPos[4];\n"
|
||||
" float4 m_worldNormal; // w: m_nPoints\n"
|
||||
"\n"
|
||||
" u32 m_coeffs;\n"
|
||||
" u32 m_batchIdx;\n"
|
||||
"\n"
|
||||
" int m_bodyAPtrAndSignBit;//x:m_bodyAPtr, y:m_bodyBPtr\n"
|
||||
" int m_bodyBPtrAndSignBit;\n"
|
||||
"\n"
|
||||
" int m_childIndexA;\n"
|
||||
" int m_childIndexB;\n"
|
||||
" int m_unused1;\n"
|
||||
" float m_unused1;\n"
|
||||
" int m_unused2;\n"
|
||||
"\n"
|
||||
"} Contact4;\n"
|
||||
@@ -678,10 +677,8 @@ static const char* satClipKernelsCL= \
|
||||
"\n"
|
||||
"#define PARALLEL_SUM(v, n) for(int j=1; j<n; j++) v[0] += v[j];\n"
|
||||
"#define PARALLEL_DO(execution, n) for(int ie=0; ie<n; ie++){execution;}\n"
|
||||
"#define REDUCE_MAX(v, n) {int i=0;"
|
||||
"for(int offset=0; offset<n; offset++) v[i] = (v[i].y > v[i+offset].y)? v[i]: v[i+offset]; }\n"
|
||||
"#define REDUCE_MIN(v, n) {int i=0;"
|
||||
"for(int offset=0; offset<n; offset++) v[i] = (v[i].y < v[i+offset].y)? v[i]: v[i+offset]; }\n"
|
||||
"#define REDUCE_MAX(v, n) {int i=0; for(int offset=0; offset<n; offset++) v[i] = (v[i].y > v[i+offset].y)? v[i]: v[i+offset]; }\n"
|
||||
"#define REDUCE_MIN(v, n) {int i=0; for(int offset=0; offset<n; offset++) v[i] = (v[i].y < v[i+offset].y)? v[i]: v[i+offset]; }\n"
|
||||
"\n"
|
||||
"int extractManifoldSequentialGlobal(__global const float4* p, int nPoints, float4 nearNormal, int4* contactIdx)\n"
|
||||
"{\n"
|
||||
@@ -1947,4 +1944,5 @@ static const char* satClipKernelsCL= \
|
||||
" \n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"\n"
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user