diff options
author | Sven Gothel <[email protected]> | 2023-07-12 01:49:31 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-07-12 01:49:31 +0200 |
commit | 791eb1b2ae3001f04d59a61f634161e21d96ef6d (patch) | |
tree | 24be59b1a6bcbbec4e09c972d461ae2fe69078b9 /src/com/jogamp/opencl/CLBuffer.java | |
parent | dc1424050e47cd239ad26c4f12fb3a0e4289d682 (diff) | |
parent | 2ad07a7e3e8cf1fc29fe7cbb3256c4c2cda27d02 (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.java | 2 |
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"); |