- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm following the GL/CL interop Intel tutorial on a Linux 4.9 kernel distro with an Intel N4200/HD Graphics 505.
The device reports having the "cl_khr_gl_sharing" extension and i've loaded the "clGetGLContextInfoKHR" function.
But when I try to get cl devices for gl context, I get 0 devices. This is the code:
// Create CL context properties, add GLX context & handle to DC cl_context_properties properties[] = { CL_GL_CONTEXT_KHR, (cl_context_properties)glXGetCurrentContext(), // GLX Context CL_GLX_DISPLAY_KHR, (cl_context_properties)glXGetCurrentDisplay(), // GLX Display CL_CONTEXT_PLATFORM, (cl_context_properties)platform, // OpenCL platform 0}; // Find CL capable devices in the current GL context cl_device_id devices[32]; size_t size; clGetGLContextInfoKHR(properties, CL_DEVICES_FOR_GL_CONTEXT_KHR, 32 * sizeof(cl_device_id), devices, &size);
Is Linux not supported? I'm using the official Linux OpenCL drivers.
Cheers
Russell
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page