Hi all !
I'm actually experiencing some troubles with the cl_gl sharing extension. I'm on windows 7, developping under Qt Creator (4.7) and using the nvidia OpenCL 1.0 (CUDA 3.2.1 driver). I also installed the Intel OpenCL 1.1 driver.
My program crashed when i try to create a CL image object from a GL texture object; the error is CL_INVALID_CONTEXT.
When i checked for errors when creating context (with clCreateContext), i saw this :
- I've got a VALID GL context ();[/*:m:14kpthuk]Code :QGLContext::currentContext() != 0
- I usewhen passing to the properties ;[/*:m:14kpthuk]Code :wglGetCurrentDC() for CL_WGL_HDC_KHR and wglGetCurrentContext() for CL_GL_CONTEXT_KHR
- When i list all the CL devices "which may be associated with the specified OpenGL context" using clGetGLContextInfoKHR and param_name CL_DEVICES_FOR_GL_CONTEXT_KHR, the returned value is 0 but i query for CL_DEVICES_FOR_GL_CONTEXT_KHR, the size is equal to 1 ?[/*:m:14kpthuk]
- Finally, when the code execute "clCreateContext" with the correct params, it returns the error code "-59" which corresponds to "CL_INVALID_OPERATION" (source : cl.h) but it listed nowhere in the specs ??[/*:m:14kpthuk]
Could someone give me some hints about that.