aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLBuffer.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-07-12 01:49:31 +0200
committerSven Gothel <[email protected]>2023-07-12 01:49:31 +0200
commit791eb1b2ae3001f04d59a61f634161e21d96ef6d (patch)
tree24be59b1a6bcbbec4e09c972d461ae2fe69078b9 /src/com/jogamp/opencl/CLBuffer.java
parentdc1424050e47cd239ad26c4f12fb3a0e4289d682 (diff)
parent2ad07a7e3e8cf1fc29fe7cbb3256c4c2cda27d02 (diff)
Merge remote-tracking branch 'wwalker/master'v2.5.0
Diffstat (limited to 'src/com/jogamp/opencl/CLBuffer.java')
-rw-r--r--src/com/jogamp/opencl/CLBuffer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLBuffer.java b/src/com/jogamp/opencl/CLBuffer.java
index 065de079..81e036fc 100644
--- a/src/com/jogamp/opencl/CLBuffer.java
+++ b/src/com/jogamp/opencl/CLBuffer.java
@@ -82,7 +82,7 @@ public class CLBuffer<B extends Buffer> extends CLMemory<B> {
final CL binding = context.getPlatform().getCLBinding();
final int[] result = new int[1];
- final int size = Buffers.sizeOfBufferElem(directBuffer) * directBuffer.capacity();
+ final int size = Buffers.sizeOfBufferElem(directBuffer) * directBuffer.limit();
final long id = binding.clCreateBuffer(context.ID, flags, size, host_ptr, result, 0);
CLException.checkForError(result[0], "can not create cl buffer");