aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/build.xml11
-rw-r--r--make/config/cl-if.cfg9
-rw-r--r--make/config/cl-impl-11.cfg4
-rw-r--r--make/config/cl-impl-12.cfg4
-rw-r--r--make/config/cl-impl-20.cfg4
-rw-r--r--make/config/clgl-if.cfg26
-rw-r--r--src/com/jogamp/opencl/CLCommandQueue.java9
-rw-r--r--src/com/jogamp/opencl/CLEvent.java1
-rw-r--r--src/com/jogamp/opencl/CLException.java17
-rw-r--r--src/com/jogamp/opencl/CLMemory.java2
-rw-r--r--src/com/jogamp/opencl/gl/CLGLBuffer.java7
-rw-r--r--src/com/jogamp/opencl/gl/CLGLContext.java13
-rw-r--r--src/com/jogamp/opencl/gl/CLGLImage2d.java4
-rw-r--r--src/com/jogamp/opencl/gl/CLGLTexture2d.java4
-rw-r--r--src/com/jogamp/opencl/gl/CLGLTexture3d.java4
15 files changed, 35 insertions, 84 deletions
diff --git a/make/build.xml b/make/build.xml
index 24704397..e608d255 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -410,17 +410,6 @@
<classpath refid="gluegen.classpath" />
</gluegen>
- <echo message="Generating CLGL.java from OpenCL version 1.1"/>
- <gluegen src="${stub.includes}/opencl.h"
- outputRootDir="${build}"
- config="${config}/clgl-if.cfg"
- includeRefid="stub.includes.fileset.all.11"
- literalInclude="${stub.includes.gluegen.all}"
- emitter="com.jogamp.gluegen.JavaEmitter"
- debug="false">
- <classpath refid="gluegen.classpath" />
- </gluegen>
-
<echo message="Generating CLImpl.java, CLImpl_JNI.c, and CLProcAddressTable.java for OpenCL version 1.1"/>
<gluegen src="${stub.includes}/opencl.h"
outputRootDir="${build}"
diff --git a/make/config/cl-if.cfg b/make/config/cl-if.cfg
index d4d600b1..b01ab957 100644
--- a/make/config/cl-if.cfg
+++ b/make/config/cl-if.cfg
@@ -14,9 +14,6 @@ ClassJavadoc CL * @author Michael Bien, GlueGen, et al.
ClassJavadoc CL */
JavaClass CL
-#ignore cl-gl interoperability functions. Interface 'CL' is pure OpenCL.
-Ignore CL_GL_.*|cl.*GL.*|.*_GL_.*
-
Ignore clCreateContext
Ignore clCreateContextFromType
Ignore clBuildProgram
@@ -44,3 +41,9 @@ CustomJavaCode CL public int clSetMemObjectDestructorCallback(long memObjID, CL
CustomJavaCode CL
CustomJavaCode CL /** Interface to C language function: <br> <code> int32_t {@native clSetEventCallback}(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK *pfn_event_notify) (cl_event event, cl_int event_command_exec_status, void *user_data), void *user_data); </code> */
CustomJavaCode CL public int clSetEventCallback(long event, int type, CLEventCallback cb);
+
+CustomJavaCode CL /** To be used on Mac OSX instead of {@link #CL_CGL_SHAREGROUP_KHR}}. FIXME: For all Mac OSX versions? */
+CustomJavaCode CL public static final int CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE = 0x10000000;
+
+#append to generated c files
+#CustomCCode #include <inttypes.h>
diff --git a/make/config/cl-impl-11.cfg b/make/config/cl-impl-11.cfg
index 34d48424..25f3a11b 100644
--- a/make/config/cl-impl-11.cfg
+++ b/make/config/cl-impl-11.cfg
@@ -4,7 +4,7 @@ NativeOutputDir gensrc/native/jocl11
Style ImplOnly
#imports for all generated java files
-Import com.jogamp.opencl.llb.gl.CLGL
+Import com.jogamp.opencl.llb.CL
Import java.security.AccessController
Import java.security.PrivilegedAction
Import com.jogamp.common.nio.PointerBuffer
@@ -22,7 +22,7 @@ ClassJavadoc CLImpl11 */
ImplJavaClass CLImpl11
AccessControl CLImpl11 PUBLIC
-Implements CLImpl11 CLGL
+Implements CLImpl11 CL
LocalProcAddressCallingConvention __ALL__ CL_API_CALL
diff --git a/make/config/cl-impl-12.cfg b/make/config/cl-impl-12.cfg
index 2f8e8dd1..c6b875f7 100644
--- a/make/config/cl-impl-12.cfg
+++ b/make/config/cl-impl-12.cfg
@@ -4,7 +4,7 @@ NativeOutputDir gensrc/native/jocl12
Style ImplOnly
#imports for all generated java files
-Import com.jogamp.opencl.llb.gl.CLGL
+Import com.jogamp.opencl.llb.CL
Import java.security.AccessController
Import java.security.PrivilegedAction
Import com.jogamp.common.nio.PointerBuffer
@@ -22,7 +22,7 @@ ClassJavadoc CLImpl12 */
ImplJavaClass CLImpl12
AccessControl CLImpl12 PUBLIC
-Implements CLImpl12 CLGL
+Implements CLImpl12 CL
LocalProcAddressCallingConvention __ALL__ CL_API_CALL
diff --git a/make/config/cl-impl-20.cfg b/make/config/cl-impl-20.cfg
index 8f8358ed..145d52b1 100644
--- a/make/config/cl-impl-20.cfg
+++ b/make/config/cl-impl-20.cfg
@@ -4,7 +4,7 @@ NativeOutputDir gensrc/native/jocl20
Style ImplOnly
#imports for all generated java files
-Import com.jogamp.opencl.llb.gl.CLGL
+Import com.jogamp.opencl.llb.CL
Import java.security.AccessController
Import java.security.PrivilegedAction
Import com.jogamp.common.nio.PointerBuffer
@@ -22,7 +22,7 @@ ClassJavadoc CLImpl20 */
ImplJavaClass CLImpl20
AccessControl CLImpl20 PUBLIC
-Implements CLImpl20 CLGL
+Implements CLImpl20 CL
LocalProcAddressCallingConvention __ALL__ CL_API_CALL
diff --git a/make/config/clgl-if.cfg b/make/config/clgl-if.cfg
deleted file mode 100644
index 1671f76c..00000000
--- a/make/config/clgl-if.cfg
+++ /dev/null
@@ -1,26 +0,0 @@
-Include cl-common.cfg
-
-#overwrite package
-Package com.jogamp.opencl.llb.gl
-
-import com.jogamp.opencl.llb.CL
-
-Style InterfaceOnly
-
-ClassJavadoc CLGL /**
-ClassJavadoc CLGL * Java bindings to OpenCL, the Open Computing Language.
-ClassJavadoc CLGL * OpenGL - OpenCL interoperability.
-ClassJavadoc CLGL * @author Michael Bien, GlueGen, et al.
-ClassJavadoc CLGL */
-JavaClass CLGL
-
-Extends CLGL CL
-
-#only include token starting with CL_GL_ and methods containing GL
-IgnoreNot CL_GL_.*|cl.*GL.*|.*_GL_.*
-
-CustomJavaCode CLGL /** To be used on Mac OSX instead of {@link #CL_CGL_SHAREGROUP_KHR}}. FIXME: For all Mac OSX versions? */
-CustomJavaCode CLGL public static final int CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE = 0x10000000;
-
-#append to generated c files
-#CustomCCode #include <inttypes.h>
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java
index 5dda0946..f95576b6 100644
--- a/src/com/jogamp/opencl/CLCommandQueue.java
+++ b/src/com/jogamp/opencl/CLCommandQueue.java
@@ -47,7 +47,6 @@ import com.jogamp.common.nio.CachedBufferFactory;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.gl.CLGLObject;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.gl.CLGL;
/**
* The command queue is used to queue a set of operations for a specific {@link CLDevice}.
@@ -1701,9 +1700,7 @@ public class CLCommandQueue extends CLObjectResource {
conditions = condition.size;
}
- final CLGL xl = (CLGL) cl;
-
- final int ret = xl.clEnqueueAcquireGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
+ final int ret = cl.clEnqueueAcquireGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
conditions, conditionIDs,
events==null ? null : events.IDs);
@@ -1770,9 +1767,7 @@ public class CLCommandQueue extends CLObjectResource {
conditions = condition.size;
}
- final CLGL xl = (CLGL) cl;
-
- final int ret = xl.clEnqueueReleaseGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
+ final int ret = cl.clEnqueueReleaseGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
conditions, conditionIDs,
events==null ? null : events.IDs);
diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java
index 2406f4ac..af22e24a 100644
--- a/src/com/jogamp/opencl/CLEvent.java
+++ b/src/com/jogamp/opencl/CLEvent.java
@@ -35,7 +35,6 @@ import com.jogamp.common.nio.PointerBuffer;
import java.nio.Buffer;
import static com.jogamp.opencl.llb.CL.*;
-import static com.jogamp.opencl.llb.gl.CLGL.*;
import static com.jogamp.opencl.CLException.*;
/**
diff --git a/src/com/jogamp/opencl/CLException.java b/src/com/jogamp/opencl/CLException.java
index c8ad3fde..890c2036 100644
--- a/src/com/jogamp/opencl/CLException.java
+++ b/src/com/jogamp/opencl/CLException.java
@@ -28,7 +28,6 @@
package com.jogamp.opencl;
-import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.llb.CL;
/**
@@ -146,8 +145,8 @@ public class CLException extends RuntimeException {
case CL.CL_PLATFORM_NOT_FOUND_KHR: return "CL_PLATFORM_NOT_FOUND_KHR";
case CL.CL_MISALIGNED_SUB_BUFFER_OFFSET: return "CL_MISALIGNED_SUB_BUFFER_OFFSET";
case CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST";
- case CLGL.CL_INVALID_GL_OBJECT: return "CL_INVALID_GL_OBJECT";
- case CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
+ case CL.CL_INVALID_GL_OBJECT: return "CL_INVALID_GL_OBJECT";
+ case CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
default: return null;
}
}
@@ -203,8 +202,8 @@ public class CLException extends RuntimeException {
case CL.CL_PLATFORM_NOT_FOUND_KHR: return new CLPlatformNotFoundKhrException(message);
case CL.CL_MISALIGNED_SUB_BUFFER_OFFSET: return new CLMisalignedSubBufferOffsetException(message);
case CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: return new CLExecStatusErrorForEventsInWaitListException(message);
- case CLGL.CL_INVALID_GL_OBJECT: return new CLInvalidGLObjectException(message);
- case CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return new CLInvalidGLSharegroupReferenceKhrException(message);
+ case CL.CL_INVALID_GL_OBJECT: return new CLInvalidGLObjectException(message);
+ case CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return new CLInvalidGLSharegroupReferenceKhrException(message);
default: return null;
}
}
@@ -664,9 +663,9 @@ public class CLException extends RuntimeException {
*
*/
public final static class CLInvalidGLObjectException extends CLException {
- private static final long serialVersionUID = CLException.serialVersionUID+CLGL.CL_INVALID_GL_OBJECT;
+ private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_INVALID_GL_OBJECT;
public CLInvalidGLObjectException(final String message) {
- super(CLGL.CL_INVALID_GL_OBJECT, "CL_INVALID_GL_OBJECT", message);
+ super(CL.CL_INVALID_GL_OBJECT, "CL_INVALID_GL_OBJECT", message);
}
}
@@ -719,9 +718,9 @@ public class CLException extends RuntimeException {
*
*/
public final static class CLInvalidGLSharegroupReferenceKhrException extends CLException {
- private static final long serialVersionUID = CLException.serialVersionUID+CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR;
+ private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR;
public CLInvalidGLSharegroupReferenceKhrException(final String message) {
- super(CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR, "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR", message);
+ super(CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR, "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR", message);
}
}
diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java
index cf1d8802..6a28d0a5 100644
--- a/src/com/jogamp/opencl/CLMemory.java
+++ b/src/com/jogamp/opencl/CLMemory.java
@@ -39,7 +39,7 @@ import java.util.EnumSet;
import java.util.List;
import static com.jogamp.opencl.CLException.*;
-import static com.jogamp.opencl.llb.gl.CLGL.*;
+import static com.jogamp.opencl.llb.CL.*;
/**
* Common superclass for all OpenCL memory types.
diff --git a/src/com/jogamp/opencl/gl/CLGLBuffer.java b/src/com/jogamp/opencl/gl/CLGLBuffer.java
index 11d3a553..660f243f 100644
--- a/src/com/jogamp/opencl/gl/CLGLBuffer.java
+++ b/src/com/jogamp/opencl/gl/CLGLBuffer.java
@@ -32,7 +32,7 @@ import com.jogamp.opencl.CLBuffer;
import com.jogamp.opencl.CLCommandQueue;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
-import com.jogamp.opencl.llb.gl.CLGL;
+import com.jogamp.opencl.llb.CL;
import java.nio.Buffer;
import com.jogamp.opengl.GLContext;
@@ -59,10 +59,9 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
static <B extends Buffer> CLGLBuffer<B> create(final CLContext context, final B directBuffer, final long size, final int flags, final int glBuffer) {
checkBuffer(directBuffer, flags);
- final CLGL clgli = (CLGL)getCL(context);
-
+ final CL cl = getCL(context);
final int[] result = new int[1];
- final long id = clgli.clCreateFromGLBuffer(context.ID, flags, glBuffer, result, 0);
+ final long id = cl.clCreateFromGLBuffer(context.ID, flags, glBuffer, result, 0);
CLException.checkForError(result[0], "can not create CLGLObject from glBuffer #"+glBuffer);
return new CLGLBuffer<B>(context, directBuffer, id, glBuffer, size, flags);
diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java
index e1d7d0ce..44f349cd 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -45,7 +45,6 @@ import com.jogamp.opencl.CLDevice;
import com.jogamp.opencl.CLMemory.Mem;
import com.jogamp.opencl.CLPlatform;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.gl.CLGL;
/**
* OpenCL Context supporting JOGL-JOCL interoperablity.
@@ -164,7 +163,7 @@ public final class CLGLContext extends CLContext {
// create the OpenGL context."
properties = PointerBuffer.allocateDirect(7);
final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
- properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
+ properties.put(CL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_GLX_DISPLAY_KHR).put(displayHandle)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof WindowsWGLContext) {
@@ -174,7 +173,7 @@ public final class CLGLContext extends CLContext {
// HDC handle of the display used to create the OpenGL context."
properties = PointerBuffer.allocateDirect(7);
final long surfaceHandle = ctxImpl.getDrawableImpl().getNativeSurface().getSurfaceHandle();
- properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
+ properties.put(CL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_WGL_HDC_KHR).put(surfaceHandle)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof MacOSXCGLContext) {
@@ -191,7 +190,7 @@ public final class CLGLContext extends CLContext {
final long cgl = CGL.getCGLContext(glID[0]);
final long group = CGL.CGLGetShareGroup(cgl);
properties = PointerBuffer.allocateDirect(5);
- properties.put(CLGL.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(group)
+ properties.put(CL.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(group)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof EGLContext) {
// TODO test EGL
@@ -202,7 +201,7 @@ public final class CLGLContext extends CLContext {
// display used to create the OpenGL ES or OpenGL context."
properties = PointerBuffer.allocateDirect(7);
final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
- properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
+ properties.put(CL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_EGL_DISPLAY_KHR).put(displayHandle)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else{
@@ -318,8 +317,8 @@ public final class CLGLContext extends CLContext {
* Return the low level OpenCL interface with OpenGL interoperability.
*/
@Override
- public CLGL getCL() {
- return (CLGL)super.getCL();
+ public CL getCL() {
+ return super.getCL();
}
/**
diff --git a/src/com/jogamp/opencl/gl/CLGLImage2d.java b/src/com/jogamp/opencl/gl/CLGLImage2d.java
index 67616542..2422af93 100644
--- a/src/com/jogamp/opencl/gl/CLGLImage2d.java
+++ b/src/com/jogamp/opencl/gl/CLGLImage2d.java
@@ -29,7 +29,6 @@
package com.jogamp.opencl.gl;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
import com.jogamp.opencl.CLImage2d;
@@ -62,9 +61,8 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO
final CL cl = getCL(context);
final int[] result = new int[1];
- final CLGL clgli = (CLGL)cl;
- final long id = clgli.clCreateFromGLRenderbuffer(context.ID, flags, renderbuffer, result, 0);
+ final long id = cl.clCreateFromGLRenderbuffer(context.ID, flags, renderbuffer, result, 0);
CLException.checkForError(result[0], "can not create CLGLImage2d from renderbuffer #"+renderbuffer+".");
return createImage(context, id, directBuffer, renderbuffer, flags);
diff --git a/src/com/jogamp/opencl/gl/CLGLTexture2d.java b/src/com/jogamp/opencl/gl/CLGLTexture2d.java
index 9b68e524..7cc591fa 100644
--- a/src/com/jogamp/opencl/gl/CLGLTexture2d.java
+++ b/src/com/jogamp/opencl/gl/CLGLTexture2d.java
@@ -33,7 +33,6 @@ import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
import com.jogamp.opencl.CLImageFormat;
import com.jogamp.opencl.llb.impl.CLImageFormatImpl;
-import com.jogamp.opencl.llb.gl.CLGL;
import java.nio.Buffer;
@@ -59,9 +58,8 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C
final CL cl = getCL(context);
final int[] result = new int[1];
- final CLGL clgli = (CLGL)cl;
- final long id = clgli.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0);
+ final long id = cl.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0);
CLException.checkForError(result[0], "can not create CLGLTexture2d from texture #"+texture+".");
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);
diff --git a/src/com/jogamp/opencl/gl/CLGLTexture3d.java b/src/com/jogamp/opencl/gl/CLGLTexture3d.java
index 24893dd1..d61c4553 100644
--- a/src/com/jogamp/opencl/gl/CLGLTexture3d.java
+++ b/src/com/jogamp/opencl/gl/CLGLTexture3d.java
@@ -28,7 +28,6 @@
package com.jogamp.opencl.gl;
-import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.llb.CL;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
@@ -68,9 +67,8 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG
final CL cl = getCL(context);
final int[] result = new int[1];
- final CLGL clgli = (CLGL)cl;
- final long id = clgli.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0);
+ final long id = cl.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0);
CLException.checkForError(result[0], "can not create CLGLTexture3d from texture #"+texture+".");
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);