Hi forum,
I am trying to creating program object from source and i am getting error while building the program. Here goes the snippet :
.................................
................................
_m_clProgramObject = clCreateProgramWithSource(context->_m_clContext,
1,
(const char**)&srcStr,
NULL,
&errNum);
if(errNum != CL_SUCCESS )
{
osg::notify(osg::FATAL) << __FUNCTION__ << ": Failed to create CL program from source. " << context->getErrorString(errNum) << std::endl;
return false;
}
errNum = clBuildProgram(_m_clProgramObject,0,NULL,NULL,NULL,NULL);
if(errNum != CL_SUCCESS)
{
//determine the reason of the error
char buildLog[16384];
clGetProgramBuildInfo(_m_clProgramObject,
context->_m_clDevice,
CL_PROGRAM_BUILD_LOG,
sizeof(buildLog),
buildLog,
NULL);
osg::notify(osg::FATAL) << __FUNCTION__ << ": Error in OpenCL Program Object building." << std::endl;
osg::notify(osg::FATAL) << buildLog << std::endl;
osg::notify(osg::FATAL) << __FUNCTION__ << ": " << context->getErrorString(errNum) << std::endl;
//release the OpenCL program object
clReleaseProgram(_m_clProgramObject);
return false;
}
And i am getting the following error output:
Source file: TexFilter.cl
createProgramFromSource: Error in OpenCL Program Object building.
ptxas application ptx input, line 100; error : Illegal operand type to instruction 'ld'
ptxas application ptx input, line 111; error : Call has wrong number of parameters
ptxas fatal : Ptx assembly aborted due to errors
createProgramFromSource: CL_INVALID_BINARY
OpenCL Program Object Creation Failed.
Any hint is greatly appreciated!
Thanks
Sajjadul