Bug 825

Summary: CLContext creation with GLContext sharing returns CL_INVALID_VALUE on Mac OS X
Product: [JogAmp] Jocl Reporter: lixoman100
Component: openclAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: normal CC: gouessej
Priority: ---    
Version: 1   
Hardware: Other   
OS: macosx   
Type: --- SCM Refs:
7b21b5abb6373637eeeb270de05bb7472f70b853 722624dbbce37fa69c0cae0d832beb5a58d68739 ef02c4dc2aced367ad5de29171d138161e2b3514
Workaround: ---

Description lixoman100 2013-09-04 19:12:37 CEST
It is not currently possible to create a CLContext in Mac OS X (tested on 10.8.4) as it returns CL_INVALID_VALUE.

After much testing, I have narrowed it down to the method setupContextProperties() on CLGLContext.java. On Mac OS X, it puts in the property CL_CGL_SHAREGROUP_KHR. However, on Mac OS X (at least on the current version), the correct argument is CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE. Since this constant is not present on CL.java, I fixed it by replacing CL_CGL_SHAREGROUP_KHR with 268435456 (which is the value for CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).
Comment 1 lixoman100 2013-09-04 19:14:37 CEST
Fix included in this pull request: https://github.com/JogAmp/jocl/pull/2
Comment 2 Sven Gothel 2013-10-12 22:23:04 CEST
Thank you!