From 59ec9a937001549262c37c543266cc6015e53f9d Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Wed, 20 Apr 2011 01:01:42 +0200 Subject: added mapped CLMemory argument to putUnmapMemory for more flexibility. --- test/com/jogamp/opencl/CLBufferTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/com/jogamp/opencl/CLBufferTest.java b/test/com/jogamp/opencl/CLBufferTest.java index 0e4a4a6..1b71827 100644 --- a/test/com/jogamp/opencl/CLBufferTest.java +++ b/test/com/jogamp/opencl/CLBufferTest.java @@ -158,10 +158,10 @@ public class CLBufferTest { ByteBuffer mappedBufferA = queue.putMapBuffer(clBufferA, Map.READ_WRITE, true); assertEquals(sizeInBytes, mappedBufferA.capacity()); - fillBuffer(mappedBufferA, 12345); // write to A + fillBuffer(mappedBufferA, 12345); // write to A - queue.putUnmapMemory(clBufferA) // unmap A - .putCopyBuffer(clBufferA, clBufferB); // copy A -> B + queue.putUnmapMemory(clBufferA, mappedBufferA)// unmap A + .putCopyBuffer(clBufferA, clBufferB); // copy A -> B // map B for read operations ByteBuffer mappedBufferB = queue.putMapBuffer(clBufferB, Map.READ, true); @@ -171,7 +171,7 @@ public class CLBufferTest { checkIfEqual(mappedBufferA, mappedBufferB, elements); // A == B ? out.println("results are valid"); - queue.putUnmapMemory(clBufferB); // unmap B + queue.putUnmapMemory(clBufferB, mappedBufferB); // unmap B context.release(); -- cgit v1.2.3