<?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>773</bug_id>
          
          <creation_ts>2013-07-03 16:38:46 +0200</creation_ts>
          <short_desc>Device specific JOCL dynamic library look-up on Android</short_desc>
          <delta_ts>2013-10-19 07:18:52 +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>All</rep_platform>
          <op_sys>all</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>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>863</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Xerxes Rånby">xerxes</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>founder</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>6be41a8e457ec2881f4ce351395ba84748a737b6
51bb8b2259e8eae9f62ec7202e8b7eb934a44c85</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2753</commentid>
    <comment_count>0</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2013-07-03 16:38:46 +0200</bug_when>
    <thetext>According to the aopencl project:
http://code.google.com/p/aopencl/
The OpenCL functions are found in
/system/vendor/lib/egl/libGLES_mali.so
on Nexus 10 T604 based devices
and
/system/lib/libllvm-a3xx.so
on Nexus 4 Adreno 320 based GPU&apos;s

We need to enhance the JOCL dynamic library look-up to search for OpenCL symbols in non standard locations. This will allow use of JOCL on the first generation OpenCL Android devices.

For more info see:
http://forum.jogamp.org/OpenCL-on-mobile-devices-td4028411.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2755</commentid>
    <comment_count>1</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2013-07-03 16:46:19 +0200</bug_when>
    <thetext>https://developer.qualcomm.com/comment/6087#comment-6087
Some nexus 4 devices got OpenCL in:
/system/lib/libOpenCL.so</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2968</commentid>
    <comment_count>2</comment_count>
    <who name="MichaelEGR">founder</who>
    <bug_when>2013-09-17 04:08:23 +0200</bug_when>
    <thetext>I&apos;m working with the ODROID-XU Android development board. It uses an Exynos 5410 SoC w/ PowerVR SGX544MP3 GPU supporting OpenCL 1.1 EP.

http://www.hardkernel.com/renewal_2011/products/prdt_info.php?g_code=G137510300620

The driver is located here:
/system/vendor/lib/libPVROCL.so

I have initially tested it via modifying the aopencl project mentioned in reply #1 above. I assume this is the general location for other PowerVR GPU OpenCL drivers. I&apos;m now taking a look at getting this working with JOCL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2969</commentid>
    <comment_count>3</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2013-09-17 13:53:18 +0200</bug_when>
    <thetext>(In reply to comment #2)
&gt; I&apos;m working with the ODROID-XU Android development board. It uses an Exynos
&gt; 5410 SoC w/ PowerVR SGX544MP3 GPU supporting OpenCL 1.1 EP.
&gt; 
&gt; http://www.hardkernel.com/renewal_2011/products/prdt_info.
&gt; php?g_code=G137510300620
&gt; 
&gt; The driver is located here:
&gt; /system/vendor/lib/libPVROCL.so
&gt; 
&gt; I have initially tested it via modifying the aopencl project mentioned in
&gt; reply #1 above. I assume this is the general location for other PowerVR GPU
&gt; OpenCL drivers. I&apos;m now taking a look at getting this working with JOCL.

The JOCL JNI Lib loader is currently located in com.jogamp.opencl.JOCLJNILibLoader

The best way to resolve this bug is to move the implementation into a new class
com.jogamp.opencl.CLDynamicLibraryBundleInfo and use the DynamicLibraryBundle helper class provided by Gluegen.
http://jogamp.org/deployment/jogamp-next/javadoc/gluegen/javadoc/com/jogamp/common/os/DynamicLibraryBundle.html
http://jogamp.org/deployment/jogamp-next/javadoc/gluegen/javadoc/com/jogamp/common/os/DynamicLibraryBundleInfo.html

I suggest to make JOCL library and symbol look-up similar to how we do dynamic library symbol look-up inside multiple librarys for the JOGL project. You may take a look at the com.jogamp.opengl.GLDynamicLibraryBundleInfo implementation to see how we prefer to do dynamic library loading and symbol look-up inside the JogAmp projects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3143</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-19 06:48:22 +0200</bug_when>
    <thetext>    Bug 773 - Device specific JOCL dynamic library look-up on Android - Part 1/2
    
    Use DynamicLibraryBundleInfo w/ alternative native library names,
    drop manual coding of loading and binding, i.e. JOCLJNILibLoader.
    
    After trying opencl native libs (and failing), try GL libs ..
    
    We use a manual impl. to CL&apos;s &apos;clGetExtensionFunctionAddress&apos; similar to JOAL, JOGL ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3144</commentid>
    <comment_count>5</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-19 07:06:11 +0200</bug_when>
    <thetext>Part 2/2 would be to add a Android test activity (jocl test) similar to JOGL&apos;s test activities
and let it show some JOCL information ..

Anybody up to the task ?

Me off till Tuesday ..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3145</commentid>
    <comment_count>6</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-19 07:11:58 +0200</bug_when>
    <thetext>CLDynamicLibraryBundleInfo: Add libPVROCL.so lookup if Android ..

.. forgot that detail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3147</commentid>
    <comment_count>7</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2013-10-19 07:18:52 +0200</bug_when>
    <thetext>Continue at Bug 863</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>