aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/jogamp/opencl/CLMemory.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java
index 6a28d0a..00f51b6 100644
--- a/src/com/jogamp/opencl/CLMemory.java
+++ b/src/com/jogamp/opencl/CLMemory.java
@@ -145,7 +145,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObjectResource {
if(buffer == null) {
return 0;
}
- return buffer.capacity();
+ return buffer.limit();
}
/**
@@ -155,7 +155,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObjectResource {
if(buffer == null) {
return 0;
}
- return getElementSize() * buffer.capacity();
+ return getElementSize() * buffer.limit();
}
/**