summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLMemory.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-06-28 22:32:22 +0200
committerSven Gothel <[email protected]>2011-06-28 22:32:22 +0200
commit20a94528161909e12fdcbd06cf5affe89a37efb9 (patch)
treed4084b90238b1a318e308039f2492092cad438e6 /src/com/jogamp/opencl/CLMemory.java
parent3016f4fe04dcabdd82d2475a7c23d3b47e1c8766 (diff)
parent560d4b4958c2838a934fb2008357a7a85e61b546 (diff)
Fix merge w/ latest mbien/edge
Diffstat (limited to 'src/com/jogamp/opencl/CLMemory.java')
-rw-r--r--src/com/jogamp/opencl/CLMemory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java
index 0edfb7e2..281d042f 100644
--- a/src/com/jogamp/opencl/CLMemory.java
+++ b/src/com/jogamp/opencl/CLMemory.java
@@ -30,7 +30,7 @@ package com.jogamp.opencl;
import com.jogamp.opencl.llb.CLMemObjBinding;
import com.jogamp.common.nio.Buffers;
-import com.jogamp.common.nio.NativeSizeBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.llb.CL;
import com.jogamp.opencl.llb.impl.CLMemObjectDestructorCallback;
import java.nio.Buffer;
@@ -90,9 +90,9 @@ public abstract class CLMemory <B extends Buffer> extends CLObjectResource {
}
protected static long getSizeImpl(CLContext context, long id) {
- NativeSizeBuffer pb = NativeSizeBuffer.allocateDirect(1);
- CLMemObjBinding binding = context.getPlatform().getMemObjectBinding();
- int ret = binding.clGetMemObjectInfo(id, CL_MEM_SIZE, NativeSizeBuffer.elementSize(), pb.getBuffer(), null);
+ PointerBuffer pb = PointerBuffer.allocateDirect(1);
+ CLMemObjBinding binding = context.getPlatform().getMemObjectBinding(); // FIXME: CL separation makes this pretty complicated !
+ int ret = binding.clGetMemObjectInfo(id, CL_MEM_SIZE, pb.elementSize(), pb.getBuffer(), null);
checkForError(ret, "can not obtain buffer info");
return pb.get();
}