Load the ParticlesOCL.cl from memory, using the MSTRINGIFY macro, instead of loading it from disk.

Small cleanup of cmake build for NVIDIA and AMD OpenCL

For AMD Stream SDK use:
INCLUDE_DIRECTORIES( ${AMD_OPENCL_INCLUDES} )
LINK_LIBRARIES( ${CMAKE_ATISTREAMSDK_LIBPATH}/OpenCL.lib )

For NVIDIA CUDA SDK:
INCLUDE_DIRECTORIES( ${NVIDIA_OPENCL_INCLUDES} )
LINK_LIBRARIES( ${NVIDIA_OPENCL_LIBRARIES})
This commit is contained in:
erwin.coumans
2010-09-09 23:07:23 +00:00
parent cb2de12243
commit 5b34356c43
12 changed files with 89 additions and 153 deletions

View File

@@ -1,3 +1,5 @@
MSTRINGIFY(
/*
Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
Copyright (C) 2006 - 2009 Sony Computer Entertainment Inc.
@@ -13,12 +15,6 @@ subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution.
*/
#if defined(GUID_ARG)
extern int gMiniCLNumOutstandingTasks;
#else
#define GUID_ARG
#define GUID_ARG_VAL
#endif
int4 getGridPos(float4 worldPos, __global float4* pParams)
@@ -313,8 +309,7 @@ __kernel void kCollideParticles(int numParticles,
*
*/
//#define LOCAL_SIZE_LIMIT 1024U
#define LOCAL_SIZE_MAX 1024U
inline void ComparatorPrivate(int2* keyA, int2* keyB, uint dir)
{
@@ -469,3 +464,4 @@ __kernel void kBitonicSortCellIdMergeLocal(__global int2* pKey, uint arrayLength
pKey[(localSizeLimit / 2)] = l_key[get_local_id(0) + (localSizeLimit / 2)];
}
);