Fix a lot of warnings, thanks to ejtttje, Fixes issue 537
Fix soft body debug rendering
This commit is contained in:
@@ -35,8 +35,8 @@ subject to the following restrictions:
|
||||
|
||||
//#define DEBUG_MINICL_KERNELS 1
|
||||
|
||||
static char* spPlatformID = "MiniCL, SCEA";
|
||||
static char* spDriverVersion= "1.0";
|
||||
static const char* spPlatformID = "MiniCL, SCEA";
|
||||
static const char* spDriverVersion= "1.0";
|
||||
|
||||
CL_API_ENTRY cl_int CL_API_CALL clGetPlatformIDs(
|
||||
cl_uint num_entries,
|
||||
@@ -49,7 +49,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetPlatformIDs(
|
||||
{
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
*((char**)platforms) = spPlatformID;
|
||||
*((const char**)platforms) = spPlatformID;
|
||||
}
|
||||
if(num_platforms != NULL)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo(
|
||||
case CL_DEVICE_NAME:
|
||||
{
|
||||
char deviceName[] = "MiniCL CPU";
|
||||
unsigned int nameLen = strlen(deviceName)+1;
|
||||
unsigned int nameLen = (unsigned int)strlen(deviceName)+1;
|
||||
btAssert(param_value_size>strlen(deviceName));
|
||||
if (nameLen < param_value_size)
|
||||
{
|
||||
@@ -484,13 +484,13 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArg(cl_kernel clKernel ,
|
||||
btAssert(arg_size <= MINICL_MAX_ARGLENGTH);
|
||||
if (arg_index>MINI_CL_MAX_ARG)
|
||||
{
|
||||
printf("error: clSetKernelArg arg_index (%d) exceeds %d\n",arg_index,MINI_CL_MAX_ARG);
|
||||
printf("error: clSetKernelArg arg_index (%u) exceeds %u\n",arg_index,MINI_CL_MAX_ARG);
|
||||
} else
|
||||
{
|
||||
if (arg_size>MINICL_MAX_ARGLENGTH)
|
||||
//if (arg_size != MINICL_MAX_ARGLENGTH)
|
||||
{
|
||||
printf("error: clSetKernelArg argdata too large: %d (maximum is %d)\n",arg_size,MINICL_MAX_ARGLENGTH);
|
||||
printf("error: clSetKernelArg argdata too large: %zu (maximum is %zu)\n",arg_size,MINICL_MAX_ARGLENGTH);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -644,7 +644,7 @@ CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType(cl_context_propertie
|
||||
gMiniCLNumOutstandingTasks = maxNumOutstandingTasks;
|
||||
const int maxNumOfThreadSupports = 8;
|
||||
static int sUniqueThreadSupportIndex = 0;
|
||||
static char* sUniqueThreadSupportName[maxNumOfThreadSupports] =
|
||||
static const char* sUniqueThreadSupportName[maxNumOfThreadSupports] =
|
||||
{
|
||||
"MiniCL_0", "MiniCL_1", "MiniCL_2", "MiniCL_3", "MiniCL_4", "MiniCL_5", "MiniCL_6", "MiniCL_7"
|
||||
};
|
||||
@@ -660,8 +660,9 @@ CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType(cl_context_propertie
|
||||
|
||||
#if _WIN32
|
||||
btAssert(sUniqueThreadSupportIndex < maxNumOfThreadSupports);
|
||||
const char* bla = "MiniCL";
|
||||
threadSupport = new Win32ThreadSupport(Win32ThreadSupport::Win32ThreadConstructionInfo(
|
||||
// "MiniCL",
|
||||
// bla,
|
||||
sUniqueThreadSupportName[sUniqueThreadSupportIndex++],
|
||||
processMiniCLTask, //processCollisionTask,
|
||||
createMiniCLLocalStoreMemory,//createCollisionLocalStoreMemory,
|
||||
|
||||
@@ -478,12 +478,12 @@ void MiniCLKernel::updateLauncher()
|
||||
struct MiniCLKernelDescEntry
|
||||
{
|
||||
void* pCode;
|
||||
char* pName;
|
||||
const char* pName;
|
||||
};
|
||||
static MiniCLKernelDescEntry spKernelDesc[256];
|
||||
static int sNumKernelDesc = 0;
|
||||
|
||||
MiniCLKernelDesc::MiniCLKernelDesc(void* pCode, char* pName)
|
||||
MiniCLKernelDesc::MiniCLKernelDesc(void* pCode, const char* pName)
|
||||
{
|
||||
for(int i = 0; i < sNumKernelDesc; i++)
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
struct MiniCLKernelDesc
|
||||
{
|
||||
MiniCLKernelDesc(void* pCode, char* pName);
|
||||
MiniCLKernelDesc(void* pCode, const char* pName);
|
||||
};
|
||||
|
||||
#define MINICL_REGISTER(__kernel_func) static MiniCLKernelDesc __kernel_func##Desc((void*)__kernel_func, #__kernel_func);
|
||||
|
||||
Reference in New Issue
Block a user