On Tue, 25 May 2010 22:35:20 +0300, mt <[email protected]> wrote:
> I thought that the problem might be in pyopencl's context creation,
> which doesn't take the GL context into account. I tried to fix it by
> adding appropriate CL_GL_CONTEXT_KHR, CL_GLX_DISPLAY_KHR and
> CL_CONTEXT_PLATFORM props to the context, but then I got another error
> "pyopencl.LogicError: clCreateFromGLTexture2D failed: invalid value". I
> can run kernels just fine with my setup, but this GL stuff won't work.
> What am I doing wrong?

PyOpenCL refuses to use any context property it doesn't know about (with
"invalid value"), so this is PyOpenCL's fault.

I've just added support for the cl_khr_gl_sharing CL extension to
PyOpenCL. This support should include that the above properties don't cause
errors any more.

These here are the most visible parts of this support:

http://documen.tician.de/pyopencl/reference.html#pyopencl.context_properties
http://documen.tician.de/pyopencl/reference.html#pyopencl.gl_context_info
http://documen.tician.de/pyopencl/reference.html#pyopencl.get_gl_context_info_khr

I hope this helps you move forward. Please let me (and the list) how
things go.

Andreas

Attachment: pgp7xZikGfzLU.pgp
Description: PGP signature

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to