<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>825</bug_id>
          
          <creation_ts>2013-09-04 19:12:37 +0200</creation_ts>
          <short_desc>CLContext creation with GLContext sharing returns CL_INVALID_VALUE on Mac OS X</short_desc>
          <delta_ts>2013-10-12 22:23:04 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jocl</product>
          <component>opencl</component>
          <version>1</version>
          <rep_platform>Other</rep_platform>
          <op_sys>macosx</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>lixoman100</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>gouessej</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>7b21b5abb6373637eeeb270de05bb7472f70b853
722624dbbce37fa69c0cae0d832beb5a58d68739
ef02c4dc2aced367ad5de29171d138161e2b3514</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2937</commentid>
    <comment_count>0</comment_count>
    <who name="">lixoman100</who>
    <bug_when>2013-09-04 19:12:37 +0200</bug_when>
    <thetext>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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2940</commentid>
    <comment_count>1</comment_count>
    <who name="">lixoman100</who>
    <bug_when>2013-09-04 19:14:37 +0200</bug_when>
    <thetext>Fix included in this pull request: https://github.com/JogAmp/jocl/pull/2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3102</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-12 22:23:04 +0200</bug_when>
    <thetext>Thank you!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>