aboutsummaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-04-20 01:01:42 +0200
committerMichael Bien <[email protected]>2011-04-20 01:01:42 +0200
commit59ec9a937001549262c37c543266cc6015e53f9d (patch)
treee52a7c0a07a65f6612308ba26b332b07e8b56656 /src/com
parent3c06ab634c7119249d37f808a5a979a5f7776de5 (diff)
added mapped CLMemory argument to putUnmapMemory for more flexibility.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/jogamp/opencl/CLCommandQueue.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java
index eed004e4..dc954a4a 100644
--- a/src/com/jogamp/opencl/CLCommandQueue.java
+++ b/src/com/jogamp/opencl/CLCommandQueue.java
@@ -31,6 +31,7 @@ package com.jogamp.opencl;
import com.jogamp.common.nio.CachedBufferFactory;
import com.jogamp.opencl.gl.CLGLI;
import com.jogamp.common.nio.PointerBuffer;
+import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.ArrayList;
@@ -326,7 +327,7 @@ public class CLCommandQueue extends CLObject implements CLResource {
int originX, int originY, int hostX, int hostY, int rangeX, int rangeY,
long rowPitch, long slicePitch, long hostRowPitch, long hostSlicePitch,
boolean blockingRead, CLEventList condition, CLEventList events) {
- // spec: if 2d: origin/hostpos=0, ragne=1
+ // spec: if 2d: origin/hostpos=0, range=1
putReadBufferRect( readBuffer, originX, originY, 0,
hostX, hostY, 0,
rangeX, rangeY, 1,
@@ -1297,21 +1298,21 @@ public class CLCommandQueue extends CLObject implements CLResource {
/**
* Calls {@native clEnqueueUnmapMemObject}.
*/
- public CLCommandQueue putUnmapMemory(CLMemory<?> memory) {
- return putUnmapMemory(memory, null, null);
+ public CLCommandQueue putUnmapMemory(CLMemory<?> memory, Buffer mapped) {
+ return putUnmapMemory(memory, mapped, null, null);
}
/**
* Calls {@native clEnqueueUnmapMemObject}.
*/
- public CLCommandQueue putUnmapMemory(CLMemory<?> memory, CLEventList events) {
- return putUnmapMemory(memory, null, events);
+ public CLCommandQueue putUnmapMemory(CLMemory<?> memory, Buffer mapped, CLEventList events) {
+ return putUnmapMemory(memory, mapped, null, events);
}
/**
* Calls {@native clEnqueueUnmapMemObject}.
*/
- public CLCommandQueue putUnmapMemory(CLMemory<?> memory, CLEventList condition, CLEventList events) {
+ public CLCommandQueue putUnmapMemory(CLMemory<?> memory, Buffer mapped, CLEventList condition, CLEventList events) {
PointerBuffer conditionIDs = null;
int conditions = 0;
@@ -1320,7 +1321,7 @@ public class CLCommandQueue extends CLObject implements CLResource {
conditions = condition.size;
}
- int ret = cl.clEnqueueUnmapMemObject(ID, memory.ID, memory.getBuffer(),
+ int ret = cl.clEnqueueUnmapMemObject(ID, memory.ID, mapped,
conditions, conditionIDs, events==null ? null : events.IDs);
if(ret != CL_SUCCESS) {
throw newException(ret, "can not unmap " + memory + toStr(condition, events));