Hi forum,
I have created an opencl context with the gl-cl interoperability. The context creation was fine and it did not give me any cl error string . But i am getting some trouble while making opencl image buffer from 2D gl texture object. I am getting the cl error string "CL_OUT_OF_RESOURCES"
I suspect that i have problem with context creation. Since i am not getting any cl error string other than CL_SUCCESS, i do not know how else to validate the successful opencl context creation with gl-cl interoperability.
To find the context info i am doing the following :
//now pull out the context infor from the recently created context size_t contextPropertySize = 0; cl_context_properties *properties = NULL; //now extract the context information that we have created errNum = clGetContextInfo(_m_clContext,CL_CONTEXT_PROPERTIES,0,NULL,&contextPropertySize); if(errNum != CL_SUCCESS) { osg::notify(osg::FATAL) << __FUNCTION__ << ": "<< __LINE__ << ": "<< "Error while clGetContextInfo(..)"<< getErrorString(errNum) << std::endl; } properties = new cl_context_properties[contextPropertySize]; errNum = clGetContextInfo(_m_clContext,CL_CONTEXT_PROPERTIES,contextPropertySize,properties,NULL); if(errNum != CL_SUCCESS) { osg::notify(osg::FATAL) << __FUNCTION__ << ": "<< __LINE__ << ": "<< "Error while clGetContextInfo(..)"<< getErrorString(errNum) << std::endl; }
So i have all the information inside properties array . How do i confirm that content of the properties array contain the context properties for gl-cl interoperability ?
Regards
Sajjadul