diff options
author | Wade Walker <[email protected]> | 2015-10-03 15:12:24 -0500 |
---|---|---|
committer | Wade Walker <[email protected]> | 2015-11-08 14:05:31 -0600 |
commit | 37c656e3290ff855e1752f9b8a4b830da3000b85 (patch) | |
tree | 76e0de5d788d0c250c076a481c1d376c2479c005 /src/com | |
parent | 4f45fe8db1b5c3790ef2659995c2065807c3fe74 (diff) |
Remove creation and all references to CL*Binding interfaces
This completes the removal of all CL*Binding interfaces; all tests pass
at this point.
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/jogamp/opencl/CLEvent.java | 1 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLException.java | 59 | ||||
-rw-r--r-- | src/com/jogamp/opencl/CLPlatform.java | 11 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLContext.java | 9 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLImage2d.java | 7 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLTexture2d.java | 7 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLTexture3d.java | 9 | ||||
-rw-r--r-- | src/com/jogamp/opencl/impl/CLTLAccessorFactory.java | 9 | ||||
-rw-r--r-- | src/com/jogamp/opencl/spi/CLAccessorFactory.java | 3 |
9 files changed, 47 insertions, 68 deletions
diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java index af22e24a..2406f4ac 100644 --- a/src/com/jogamp/opencl/CLEvent.java +++ b/src/com/jogamp/opencl/CLEvent.java @@ -35,6 +35,7 @@ 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 c74b99bc..c8ad3fde 100644 --- a/src/com/jogamp/opencl/CLException.java +++ b/src/com/jogamp/opencl/CLException.java @@ -30,11 +30,6 @@ package com.jogamp.opencl; import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.opencl.llb.CL; -import com.jogamp.opencl.llb.CLDeviceBinding; -import com.jogamp.opencl.llb.CLImageBinding; -import com.jogamp.opencl.llb.CLMemObjBinding; -import com.jogamp.opencl.llb.CLPlatformBinding; -import com.jogamp.opencl.llb.CLProgramBinding; /** * Main Exception type for runtime OpenCL errors and failed function calls (e.g. returning not CL_SUCCESS). @@ -102,18 +97,18 @@ public class CLException extends RuntimeException { */ public static String resolveErrorCode(final int error) { switch(error) { - case CLDeviceBinding.CL_DEVICE_NOT_FOUND: return "CL_DEVICE_NOT_FOUND"; - case CLDeviceBinding.CL_DEVICE_NOT_AVAILABLE: return "CL_DEVICE_NOT_AVAILABLE"; + case CL.CL_DEVICE_NOT_FOUND: return "CL_DEVICE_NOT_FOUND"; + case CL.CL_DEVICE_NOT_AVAILABLE: return "CL_DEVICE_NOT_AVAILABLE"; case CL.CL_COMPILER_NOT_AVAILABLE: return "CL_COMPILER_NOT_AVAILABLE"; - case CLMemObjBinding.CL_MEM_OBJECT_ALLOCATION_FAILURE: return "CL_MEM_OBJECT_ALLOCATION_FAILURE"; + case CL.CL_MEM_OBJECT_ALLOCATION_FAILURE: return "CL_MEM_OBJECT_ALLOCATION_FAILURE"; case CL.CL_OUT_OF_RESOURCES: return "CL_OUT_OF_RESOURCES"; case CL.CL_OUT_OF_HOST_MEMORY: return "CL_OUT_OF_HOST_MEMORY"; case CL.CL_PROFILING_INFO_NOT_AVAILABLE: return "CL_PROFILING_INFO_NOT_AVAILABLE"; - case CLMemObjBinding.CL_MEM_COPY_OVERLAP: return "CL_MEM_COPY_OVERLAP"; - case CLImageBinding.CL_IMAGE_FORMAT_MISMATCH: return "CL_IMAGE_FORMAT_MISMATCH"; - case CLImageBinding.CL_IMAGE_FORMAT_NOT_SUPPORTED: return "CL_IMAGE_FORMAT_NOT_SUPPORTED"; - case CLProgramBinding.CL_BUILD_PROGRAM_FAILURE: return "CL_BUILD_PROGRAM_FAILURE"; - case CLMemObjBinding.CL_MAP_FAILURE: return "CL_MAP_FAILURE"; + case CL.CL_MEM_COPY_OVERLAP: return "CL_MEM_COPY_OVERLAP"; + case CL.CL_IMAGE_FORMAT_MISMATCH: return "CL_IMAGE_FORMAT_MISMATCH"; + case CL.CL_IMAGE_FORMAT_NOT_SUPPORTED: return "CL_IMAGE_FORMAT_NOT_SUPPORTED"; + case CL.CL_BUILD_PROGRAM_FAILURE: return "CL_BUILD_PROGRAM_FAILURE"; + case CL.CL_MAP_FAILURE: return "CL_MAP_FAILURE"; case CL.CL_INVALID_VALUE: return "CL_INVALID_VALUE"; case CL.CL_INVALID_DEVICE_TYPE: return "CL_INVALID_DEVICE_TYPE"; case CL.CL_INVALID_PLATFORM: return "CL_INVALID_PLATFORM"; @@ -148,7 +143,7 @@ public class CLException extends RuntimeException { case CL.CL_INVALID_MIP_LEVEL: return "CL_INVALID_MIP_LEVEL"; case CL.CL_INVALID_GLOBAL_WORK_SIZE: return "CL_INVALID_GLOBAL_WORK_SIZE"; case CL.CL_INVALID_PROPERTY: return "CL_INVALID_PROPERTY"; - case CLPlatformBinding.CL_PLATFORM_NOT_FOUND_KHR: return "CL_PLATFORM_NOT_FOUND_KHR"; + 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"; @@ -159,18 +154,18 @@ public class CLException extends RuntimeException { private static CLException createSpecificException(final int error, final String message) { switch(error) { - case CLDeviceBinding.CL_DEVICE_NOT_FOUND: return new CLDeviceNotFoundException(message); - case CLDeviceBinding.CL_DEVICE_NOT_AVAILABLE: return new CLDeviceNotAvailableException(message); + case CL.CL_DEVICE_NOT_FOUND: return new CLDeviceNotFoundException(message); + case CL.CL_DEVICE_NOT_AVAILABLE: return new CLDeviceNotAvailableException(message); case CL.CL_COMPILER_NOT_AVAILABLE: return new CLCompilerNotAvailableException(message); - case CLMemObjBinding.CL_MEM_OBJECT_ALLOCATION_FAILURE: return new CLMemObjectAllocationFailureException(message); + case CL.CL_MEM_OBJECT_ALLOCATION_FAILURE: return new CLMemObjectAllocationFailureException(message); case CL.CL_OUT_OF_RESOURCES: return new CLOutOfResourcesException(message); case CL.CL_OUT_OF_HOST_MEMORY: return new CLOutOfHostMemoryException(message); case CL.CL_PROFILING_INFO_NOT_AVAILABLE: return new CLProfilingInfoNotAvailableException(message); - case CLMemObjBinding.CL_MEM_COPY_OVERLAP: return new CLMemCopyOverlapException(message); - case CLImageBinding.CL_IMAGE_FORMAT_MISMATCH: return new CLImageFormatMismatchException(message); - case CLImageBinding.CL_IMAGE_FORMAT_NOT_SUPPORTED: return new CLImageFormatNotSupportedException(message); - case CLProgramBinding.CL_BUILD_PROGRAM_FAILURE: return new CLBuildProgramFailureException(message); - case CLMemObjBinding.CL_MAP_FAILURE: return new CLMapFailureException(message); + case CL.CL_MEM_COPY_OVERLAP: return new CLMemCopyOverlapException(message); + case CL.CL_IMAGE_FORMAT_MISMATCH: return new CLImageFormatMismatchException(message); + case CL.CL_IMAGE_FORMAT_NOT_SUPPORTED: return new CLImageFormatNotSupportedException(message); + case CL.CL_BUILD_PROGRAM_FAILURE: return new CLBuildProgramFailureException(message); + case CL.CL_MAP_FAILURE: return new CLMapFailureException(message); case CL.CL_INVALID_VALUE: return new CLInvalidValueException(message); case CL.CL_INVALID_DEVICE_TYPE: return new CLInvalidDeviceTypeException(message); case CL.CL_INVALID_PLATFORM: return new CLInvalidPlatformException(message); @@ -205,7 +200,7 @@ public class CLException extends RuntimeException { case CL.CL_INVALID_MIP_LEVEL: return new CLInvalidMipLevelException(message); case CL.CL_INVALID_GLOBAL_WORK_SIZE: return new CLInvalidGlobalWorkSizeException(message); case CL.CL_INVALID_PROPERTY: return new CLInvalidPropertyException(message); - case CLPlatformBinding.CL_PLATFORM_NOT_FOUND_KHR: return new CLPlatformNotFoundKhrException(message); + 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); @@ -220,7 +215,7 @@ public class CLException extends RuntimeException { public final static class CLDeviceNotFoundException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_DEVICE_NOT_FOUND; public CLDeviceNotFoundException(final String message) { - super(CLDeviceBinding.CL_DEVICE_NOT_FOUND, "CL_DEVICE_NOT_FOUND", message); + super(CL.CL_DEVICE_NOT_FOUND, "CL_DEVICE_NOT_FOUND", message); } } @@ -230,7 +225,7 @@ public class CLException extends RuntimeException { public final static class CLDeviceNotAvailableException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_DEVICE_NOT_AVAILABLE; public CLDeviceNotAvailableException(final String message) { - super(CLDeviceBinding.CL_DEVICE_NOT_AVAILABLE, "CL_DEVICE_NOT_AVAILABLE", message); + super(CL.CL_DEVICE_NOT_AVAILABLE, "CL_DEVICE_NOT_AVAILABLE", message); } } @@ -250,7 +245,7 @@ public class CLException extends RuntimeException { public final static class CLMemObjectAllocationFailureException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_MEM_OBJECT_ALLOCATION_FAILURE; public CLMemObjectAllocationFailureException(final String message) { - super(CLMemObjBinding.CL_MEM_OBJECT_ALLOCATION_FAILURE, "CL_MEM_OBJECT_ALLOCATION_FAILURE", message); + super(CL.CL_MEM_OBJECT_ALLOCATION_FAILURE, "CL_MEM_OBJECT_ALLOCATION_FAILURE", message); } } @@ -290,7 +285,7 @@ public class CLException extends RuntimeException { public final static class CLMemCopyOverlapException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_MEM_COPY_OVERLAP; public CLMemCopyOverlapException(final String message) { - super(CLMemObjBinding.CL_MEM_COPY_OVERLAP, "CL_MEM_COPY_OVERLAP", message); + super(CL.CL_MEM_COPY_OVERLAP, "CL_MEM_COPY_OVERLAP", message); } } @@ -300,7 +295,7 @@ public class CLException extends RuntimeException { public final static class CLImageFormatMismatchException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_IMAGE_FORMAT_MISMATCH; public CLImageFormatMismatchException(final String message) { - super(CLImageBinding.CL_IMAGE_FORMAT_MISMATCH, "CL_IMAGE_FORMAT_MISMATCH", message); + super(CL.CL_IMAGE_FORMAT_MISMATCH, "CL_IMAGE_FORMAT_MISMATCH", message); } } @@ -310,7 +305,7 @@ public class CLException extends RuntimeException { public final static class CLImageFormatNotSupportedException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_IMAGE_FORMAT_NOT_SUPPORTED; public CLImageFormatNotSupportedException(final String message) { - super(CLImageBinding.CL_IMAGE_FORMAT_NOT_SUPPORTED, "CL_IMAGE_FORMAT_NOT_SUPPORTED", message); + super(CL.CL_IMAGE_FORMAT_NOT_SUPPORTED, "CL_IMAGE_FORMAT_NOT_SUPPORTED", message); } } @@ -320,7 +315,7 @@ public class CLException extends RuntimeException { public final static class CLBuildProgramFailureException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_BUILD_PROGRAM_FAILURE; public CLBuildProgramFailureException(final String message) { - super(CLProgramBinding.CL_BUILD_PROGRAM_FAILURE, "CL_BUILD_PROGRAM_FAILURE", message); + super(CL.CL_BUILD_PROGRAM_FAILURE, "CL_BUILD_PROGRAM_FAILURE", message); } } @@ -330,7 +325,7 @@ public class CLException extends RuntimeException { public final static class CLMapFailureException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_MAP_FAILURE; public CLMapFailureException(final String message) { - super(CLMemObjBinding.CL_MAP_FAILURE, "CL_MAP_FAILURE", message); + super(CL.CL_MAP_FAILURE, "CL_MAP_FAILURE", message); } } @@ -737,7 +732,7 @@ public class CLException extends RuntimeException { public final static class CLPlatformNotFoundKhrException extends CLException { private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_PLATFORM_NOT_FOUND_KHR; public CLPlatformNotFoundKhrException(final String message) { - super(CLPlatformBinding.CL_PLATFORM_NOT_FOUND_KHR, "CL_PLATFORM_NOT_FOUND_KHR", message); + super(CL.CL_PLATFORM_NOT_FOUND_KHR, "CL_PLATFORM_NOT_FOUND_KHR", message); } } diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java index dfb7dafa..77da10b4 100644 --- a/src/com/jogamp/opencl/CLPlatform.java +++ b/src/com/jogamp/opencl/CLPlatform.java @@ -28,22 +28,11 @@ package com.jogamp.opencl; -import com.jogamp.opencl.llb.CLPlatformBinding; -import com.jogamp.opencl.llb.CLProgramBinding; -import com.jogamp.opencl.llb.CLSamplerBinding; -import com.jogamp.opencl.llb.CLKernelBinding; -import com.jogamp.opencl.llb.CLImageBinding; import com.jogamp.opencl.llb.CL; import com.jogamp.opencl.impl.CLTLAccessorFactory; import com.jogamp.common.nio.Buffers; import com.jogamp.common.JogampRuntimeException; import com.jogamp.common.nio.PointerBuffer; -import com.jogamp.opencl.llb.CLBufferBinding; -import com.jogamp.opencl.llb.CLCommandQueueBinding; -import com.jogamp.opencl.llb.CLContextBinding; -import com.jogamp.opencl.llb.CLDeviceBinding; -import com.jogamp.opencl.llb.CLEventBinding; -import com.jogamp.opencl.llb.CLMemObjBinding; import com.jogamp.opencl.spi.CLPlatformInfoAccessor; import com.jogamp.opencl.util.CLUtil; import com.jogamp.opencl.llb.impl.CLImpl11; diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java index befa9158..e1d7d0ce 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.CLContextBinding; import com.jogamp.opencl.llb.gl.CLGL; /** @@ -167,7 +166,7 @@ public final class CLGLContext extends CLContext { final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle(); properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0]) .put(CL.CL_GLX_DISPLAY_KHR).put(displayHandle) - .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID); + .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID); }else if(glContext instanceof WindowsWGLContext) { // spec: "When the WGL binding API is supported, the attribute // CL_GL_CONTEXT_KHR should be set to an HGLRC handle to an OpenGL @@ -177,7 +176,7 @@ public final class CLGLContext extends CLContext { final long surfaceHandle = ctxImpl.getDrawableImpl().getNativeSurface().getSurfaceHandle(); properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0]) .put(CL.CL_WGL_HDC_KHR).put(surfaceHandle) - .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID); + .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID); }else if(glContext instanceof MacOSXCGLContext) { // spec: "When the CGL binding API is supported, the attribute // CL_CGL_SHAREGROUP_KHR should be set to a CGLShareGroup handle to @@ -193,7 +192,7 @@ public final class CLGLContext extends CLContext { final long group = CGL.CGLGetShareGroup(cgl); properties = PointerBuffer.allocateDirect(5); properties.put(CLGL.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(group) - .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID); + .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID); }else if(glContext instanceof EGLContext) { // TODO test EGL // spec: "When the EGL binding API is supported, the attribute @@ -205,7 +204,7 @@ public final class CLGLContext extends CLContext { final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle(); properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0]) .put(CL.CL_EGL_DISPLAY_KHR).put(displayHandle) - .put(CLContextBinding.CL_CONTEXT_PLATFORM).put(platform.ID); + .put(CL.CL_CONTEXT_PLATFORM).put(platform.ID); }else{ throw new RuntimeException("unsupported GLContext: "+glContext); } diff --git a/src/com/jogamp/opencl/gl/CLGLImage2d.java b/src/com/jogamp/opencl/gl/CLGLImage2d.java index 93c0bc3a..67616542 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.CLImageBinding; import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLException; @@ -75,10 +74,10 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO final CLImageInfoAccessor accessor = new CLImageInfoAccessor(getCL(context), id); final CLImageFormat format = createUninitializedImageFormat(); - accessor.getInfo(CLImageBinding.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); + accessor.getInfo(CL.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); - final int width = (int)accessor.getLong(CLImageBinding.CL_IMAGE_WIDTH); - final int height = (int)accessor.getLong(CLImageBinding.CL_IMAGE_HEIGHT); + final int width = (int)accessor.getLong(CL.CL_IMAGE_WIDTH); + final int height = (int)accessor.getLong(CL.CL_IMAGE_HEIGHT); return new CLGLImage2d<B>(context, directBuffer, format, accessor, width, height, id, glObject, flags); } diff --git a/src/com/jogamp/opencl/gl/CLGLTexture2d.java b/src/com/jogamp/opencl/gl/CLGLTexture2d.java index 30b8164e..9b68e524 100644 --- a/src/com/jogamp/opencl/gl/CLGLTexture2d.java +++ b/src/com/jogamp/opencl/gl/CLGLTexture2d.java @@ -29,7 +29,6 @@ package com.jogamp.opencl.gl; import com.jogamp.opencl.llb.CL; -import com.jogamp.opencl.llb.CLImageBinding; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLException; import com.jogamp.opencl.CLImageFormat; @@ -68,10 +67,10 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id); final CLImageFormat format = createUninitializedImageFormat(); - accessor.getInfo(CLImageBinding.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); + accessor.getInfo(CL.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); - final int width = (int)accessor.getLong(CLImageBinding.CL_IMAGE_WIDTH); - final int height = (int)accessor.getLong(CLImageBinding.CL_IMAGE_HEIGHT); + final int width = (int)accessor.getLong(CL.CL_IMAGE_WIDTH); + final int height = (int)accessor.getLong(CL.CL_IMAGE_HEIGHT); return new CLGLTexture2d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, id, texture, flags); diff --git a/src/com/jogamp/opencl/gl/CLGLTexture3d.java b/src/com/jogamp/opencl/gl/CLGLTexture3d.java index 2b389252..24893dd1 100644 --- a/src/com/jogamp/opencl/gl/CLGLTexture3d.java +++ b/src/com/jogamp/opencl/gl/CLGLTexture3d.java @@ -30,7 +30,6 @@ package com.jogamp.opencl.gl; import com.jogamp.opencl.llb.gl.CLGL; import com.jogamp.opencl.llb.CL; -import com.jogamp.opencl.llb.CLImageBinding; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLException; import com.jogamp.opencl.CLImage3d; @@ -77,11 +76,11 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id); final CLImageFormat format = createUninitializedImageFormat(); - accessor.getInfo(CLImageBinding.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); + accessor.getInfo(CL.CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null); - final int width = (int)accessor.getLong(CLImageBinding.CL_IMAGE_WIDTH); - final int height = (int)accessor.getLong(CLImageBinding.CL_IMAGE_HEIGHT); - final int depth = (int)accessor.getLong(CLImageBinding.CL_IMAGE_DEPTH); + final int width = (int)accessor.getLong(CL.CL_IMAGE_WIDTH); + final int height = (int)accessor.getLong(CL.CL_IMAGE_HEIGHT); + final int depth = (int)accessor.getLong(CL.CL_IMAGE_DEPTH); return new CLGLTexture3d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, depth, id, texture, flags); } diff --git a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java index 8422c4ad..7195d592 100644 --- a/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java +++ b/src/com/jogamp/opencl/impl/CLTLAccessorFactory.java @@ -35,7 +35,6 @@ package com.jogamp.opencl.impl; import java.nio.IntBuffer; import com.jogamp.common.nio.PointerBuffer; import com.jogamp.opencl.llb.CL; -import com.jogamp.opencl.llb.CLDeviceBinding; import com.jogamp.opencl.spi.CLAccessorFactory; import com.jogamp.opencl.spi.CLInfoAccessor; import com.jogamp.opencl.spi.CLPlatformInfoAccessor; @@ -50,7 +49,7 @@ import static com.jogamp.opencl.CLException.*; public class CLTLAccessorFactory implements CLAccessorFactory { @Override - public CLInfoAccessor createDeviceInfoAccessor(final CLDeviceBinding cl, final long id) { + public CLInfoAccessor createDeviceInfoAccessor(final CL cl, final long id) { return new CLDeviceInfoAccessor(cl, id); } @@ -61,10 +60,10 @@ public class CLTLAccessorFactory implements CLAccessorFactory { private final static class CLDeviceInfoAccessor extends CLTLInfoAccessor { - private final CLDeviceBinding cl; + private final CL cl; private final long ID; - private CLDeviceInfoAccessor(final CLDeviceBinding cl, final long id) { + private CLDeviceInfoAccessor(final CL cl, final long id) { this.cl = cl; this.ID = id; } @@ -99,7 +98,7 @@ public class CLTLAccessorFactory implements CLAccessorFactory { final int count = buffer.get(0); // return an empty buffer rather than throwing an exception - if(ret == CLDeviceBinding.CL_DEVICE_NOT_FOUND || count == 0) { + if(ret == CL.CL_DEVICE_NOT_FOUND || count == 0) { return new long[0]; }else{ checkForError(ret, "error while enumerating devices"); diff --git a/src/com/jogamp/opencl/spi/CLAccessorFactory.java b/src/com/jogamp/opencl/spi/CLAccessorFactory.java index 4bafe933..752891b4 100644 --- a/src/com/jogamp/opencl/spi/CLAccessorFactory.java +++ b/src/com/jogamp/opencl/spi/CLAccessorFactory.java @@ -4,7 +4,6 @@ package com.jogamp.opencl.spi; import com.jogamp.opencl.llb.CL; -import com.jogamp.opencl.llb.CLDeviceBinding; /** * Implementations of this interface are factories responsible for creating CLAccessors. @@ -12,7 +11,7 @@ import com.jogamp.opencl.llb.CLDeviceBinding; */ public interface CLAccessorFactory { - CLInfoAccessor createDeviceInfoAccessor(CLDeviceBinding cl, long id); + CLInfoAccessor createDeviceInfoAccessor(CL cl, long id); CLPlatformInfoAccessor createPlatformInfoAccessor(CL cl, long id); |