summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLMemory.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-07-04 00:16:33 +0200
committerMichael Bien <[email protected]>2010-07-04 00:16:33 +0200
commitb9c7501cc93743b168f8bc938adadf0be7d4ff80 (patch)
tree6121d3c1ce0b5130155971d776c65e0e2857db99 /src/com/jogamp/opencl/CLMemory.java
parentb90d32cba56e54e73fd93aed59b7a4edf70831d7 (diff)
misc OpenCL 1.1 HLB updates. ImageFormats, getters, javadoc.
Diffstat (limited to 'src/com/jogamp/opencl/CLMemory.java')
-rw-r--r--src/com/jogamp/opencl/CLMemory.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java
index e973fbab..6ab5cd02 100644
--- a/src/com/jogamp/opencl/CLMemory.java
+++ b/src/com/jogamp/opencl/CLMemory.java
@@ -124,6 +124,17 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL
}
/**
+ * Returns the number of buffer mappings. The map count returned should be considered immediately stale.
+ * It is unsuitable for general use in applications. This feature is provided for debugging.
+ */
+ public int getMapCount() {
+ IntBuffer value = Buffers.newDirectIntBuffer(1);
+ int ret = cl.clGetMemObjectInfo(ID, CL_MEM_MAP_COUNT, 4, value, null);
+ checkForError(ret, "can not obtain buffer map count.");
+ return value.get();
+ }
+
+ /**
* Returns true if this memory object was created with the {@link Mem#READ_ONLY} flag.
*/
public boolean isReadOnly() {
@@ -167,6 +178,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL
/**
* Returns the OpenGL object id of this shared buffer.
*/
+ @Deprecated
/*public*/ final int _getGLObjectID() {
int[] array = new int[1];
int ret = ((CLGLI)cl).clGetGLObjectInfo(ID, null, 0, array, 0);