I still run into trouble with the oclPostProcessGL example in GL_INTEROP mode (XP32, GTX260, 195.39, toolkit/SDK 3.0 beta 1)
Before adding the properties I got CL_INVALID_CONTEXT, but after adding
[codebox]
//Create the context
cl_context_properties akProperties[] = {
CL_GL_CONTEXT_KHR,
(cl_context_properties)wglGetCurrentContext(),
CL_WGL_HDC_KHR,
(cl_context_properties)wglGetCurrentDC(), 0
};
//cxGPUContext = clCreateContext(0, uiNumDevices, cdDevices, NULL, NULL, &ciErrNum);
cxGPUContext = clCreateContext(akProperties, uiNumDevices, cdDevices, NULL, NULL, &ciErrNum);
[/codebox]
I get the error
!!! Error # -30 (CL_INVALID_VALUE) at line 659 , in file .\oclPostprocessGL.cpp !!!
from both of the statements
[codebox]
#ifdef GL_INTEROP
cl_pbos[0] = clCreateFromGLBuffer(cxGPUContext, CL_MEM_READ_ONLY, pbo_source, &ciErrNum);
cl_pbos[1]= clCreateFromGLBuffer(cxGPUContext, CL_MEM_WRITE_ONLY, pbo_dest, &ciErrNum);
[/codebox]
according to docs this error means that CL_MEM_READ_ONLY is an invalid argument to clCreateFromGLBuffer, but it is listed as a valid argument here
[post=“0”]http://www.khronos.org/opencl/sdk/1.0/docs/man/xhtml/clCreateFromGLBuffer.html[/post]
Anyone else got this working on this configuration or have an idea what the problem might be?