From 8d4602f9058d44e94ddafc9618d32411ae37bb2c Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Wed, 20 Apr 2011 01:53:09 +0200 Subject: duplicate buffer before changing its position. --- src/com/jogamp/opencl/CLCommandQueue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3