Login  Register

Re: GL-CL interoperability in OSX

Posted by texone on May 30, 2012; 10:17am
URL: https://forum.jogamp.org/GL-CL-interoperability-in-OSX-tp2837450p4022227.html

I stumbled across the same Problem this code:

_myPlatForm = CLPlatform.getDefault(CLPlatformFilters.glSharing());
_myDevice = _myPlatForm.getMaxFlopsDevice(CLDeviceFilters.glSharing());
_myGLContext = CLGLContext.create(g.gl.getContext(),_myDevice);

causes this exception:

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 cc.creativecomputing.opencl.CCOpenCL.<init>(CCOpenCL.java:119)
       
Should this be working right now I have Lion installed with these devices available:

 *** Device Intel(R) Core(TM) i7 CPU       M 620  @ 2.67GHz ******************************************
   id           : 0
   name         : Intel(R) Core(TM) i7 CPU       M 620  @ 2.67GHz
   profile      : FULL_PROFILE
   version      : OpenCL 1.1
   vendor       : Intel
   type         : CPU
   compute units: 4
   gl sharing   : true
 *** Device GeForce GT 330M ******************************************
   id           : 1
   name         : GeForce GT 330M
   profile      : FULL_PROFILE
   version      : OpenCL 1.0
   vendor       : NVIDIA
   type         : GPU
   compute units: 6
   gl sharing   : true

gl sharing should be supported, any advice where to look at or how to fix this?

Best Christian