aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-04-20 01:53:09 +0200
committerMichael Bien <[email protected]>2011-04-20 01:53:09 +0200
commit8d4602f9058d44e94ddafc9618d32411ae37bb2c (patch)
tree8460afa7674e18f3a437c063a68bc5003f7ea124
parent6e35af2622d5f4627dfb564058d7cf313afffe0b (diff)
duplicate buffer before changing its position.
-rw-r--r--src/com/jogamp/opencl/CLCommandQueue.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java
index dc954a4a..67b07171 100644
--- a/src/com/jogamp/opencl/CLCommandQueue.java
+++ b/src/com/jogamp/opencl/CLCommandQueue.java
@@ -1350,7 +1350,7 @@ public class CLCommandQueue extends CLObject implements CLResource {
*/
public CLCommandQueue putWaitForEvent(CLEventList list, int index, boolean blockingWait) {
- PointerBuffer ids = PointerBuffer.wrap(list.IDs.getBuffer()).position(index);
+ PointerBuffer ids = PointerBuffer.wrap(list.IDs.getBuffer().duplicate()).position(index);
int ret = blockingWait ? cl.clWaitForEvents(1, ids)
: cl.clEnqueueWaitForEvents(ID, 1, ids);