aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLImage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/jogamp/opencl/CLImage.java')
-rw-r--r--src/com/jogamp/opencl/CLImage.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/jogamp/opencl/CLImage.java b/src/com/jogamp/opencl/CLImage.java
index fa3ab800..e2daff9c 100644
--- a/src/com/jogamp/opencl/CLImage.java
+++ b/src/com/jogamp/opencl/CLImage.java
@@ -30,9 +30,10 @@ package com.jogamp.opencl;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.impl.CLTLInfoAccessor;
+import com.jogamp.opencl.llb.CLImageBinding;
import java.nio.Buffer;
-import static com.jogamp.opencl.CL.*;
+import static com.jogamp.opencl.llb.CL.*;
/**
*
@@ -48,17 +49,21 @@ public abstract class CLImage<B extends Buffer> extends CLMemory<B> {
public final int height;
protected CLImage(CLContext context, B directBuffer, CLImageFormat format, int width, int height, long id, int flags) {
- this(context, directBuffer, format, new CLImageInfoAccessor(context.cl, id), width, height, id, flags);
+ this(context, directBuffer, format, createAccessor(context, id), width, height, id, flags);
}
protected CLImage(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int width, int height, long id, int flags) {
- super(context, directBuffer, getSizeImpl(context.cl, id), id, flags);
+ super(context, directBuffer, getSizeImpl(context, id), id, flags);
this.imageInfo = accessor;
this.format = format;
this.width = width;
this.height = height;
}
+ private static CLImageInfoAccessor createAccessor(CLContext context, long id) {
+ return new CLImageInfoAccessor(context.getPlatform().getImageBinding(), id);
+ }
+
protected static CLImageFormat createUninitializedImageFormat() {
return new CLImageFormat();
}
@@ -104,9 +109,9 @@ public abstract class CLImage<B extends Buffer> extends CLMemory<B> {
protected final static class CLImageInfoAccessor extends CLTLInfoAccessor {
private final long id;
- private final CL cl;
+ private final CLImageBinding cl;
- public CLImageInfoAccessor(CL cl, long id) {
+ public CLImageInfoAccessor(CLImageBinding cl, long id) {
this.cl = cl;
this.id = id;
}