CL-GL interoperability in OSX 10.8.2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

CL-GL interoperability in OSX 10.8.2

Jerry
Hi

I want to test CL-GL interoperability in OSX 10.8.2, but as I run the demo from github https://github.com/mbien/jocl-demos/tree/master/src/com/jogamp/opencl/demos/joglinterop , I get this error:

Exception in thread "AWT-EventQueue-0" com.jogamp.opencl.CLException$CLInvalidValueException: can not create CL context [error: CL_INVALID_VALUE]
at com.jogamp.opencl.CLException.checkForError(CLException.java:67)
        at com.jogamp.opencl.CLContext.createContext(CLContext.java:230)
        at com.jogamp.opencl.gl.CLGLContext.create(CLGLContext.java:126)
        at joglinterop.GLCLInteroperabilityDemo.init(GLCLInteroperabilityDemo.java:144)

I can create pure CL contexts and everything works fine in that case, how can I do CL-GL interoperability work in OSX?

Thanks,
Jerry
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

gouessej
Administrator
Hi

Nobody here is precisely under Mac OS X 10.8.2. Is it reproducible with an "older" version of OS X?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

Jerry
Yes, I have tried this under Mac OS X 10.6.7 in May this year and got the same error.

At that time, I thought it was related to the GL context, because Mac OS X 10.6.7 only supports OpenGL 2.1. But now GL 3.2 is supported under OS X 10.8, the error still remains...
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

gouessej
Administrator
In this case, maybe Sven can reproduce this bug. Do you use the RC11?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

Jerry
Yes, I'm using the RC11.

Thanks so much, I will be waiting for your reply. :)
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

Sven Gothel
Administrator
On 11/06/2012 01:00 PM, Jerry [via jogamp] wrote:
> Yes, I'm using the RC11.
>
> Thanks so much, I will be waiting for your reply. :)
>

This week, I will look into this,
i.e. the special context flags for sharing GL/CL.

~Sven



signature.asc (907 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

Jerry
Thanks a lot for your efforts!
Reply | Threaded
Open this post in threaded view
|

Re: CL-GL interoperability in OSX 10.8.2

Shadi
Hi Everyone,

Any progress on this issue?
I am trying to run the CLGLTest and get the same exception:

Exception in thread "main" com.jogamp.opencl.CLException$CLInvalidValueException: can not create CL context [error: CL_INVALID_VALUE]

GLSLTest reports this information:

isGLMemorySharingSupported==true on:
    CLDevice [id: 16915200 name: ATI Radeon HD 6750M type: GPU profile: FULL_PROFILE]
CLPlatform [name: Apple, vendor: Apple, profile: FULL_PROFILE, version: OpenCL 1.2 (Dec  4 2012 18:26:30)]

GLCLInteroperabilityDemo also returns the same exception.

I am running Mac OS X 10.8.3 and JOCL 2.0rc11. I also it tried with the automatic build from May 18th and get the same error.

If it is of any help, I think I got CL/GL interoperability working at some point in C++ using the following properties:

CGLContextObj kCGLContext = CGLGetCurrentContext();
CGLShareGroupObj kCGLShareGroup = CGLGetShareGroup(kCGLContext);
cl_context_properties properties[] = { CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE, (cl_context_properties)kCGLShareGroup, 0 };

But that was with an older version of Max OS X, a year or so already.

If I can help you in any way with this please let me know. This issue is quite critical to me because it render JOCL unusable on my machine.

Thanks a lot!
Shadi