summaryrefslogtreecommitdiff
path: root/src/cl_mem.h
diff options
context:
space:
mode:
authorYang Rong <rong.r.yang@intel.com>2013-08-23 11:04:21 +0800
committerZhigang Gong <zhigang.gong@linux.intel.com>2013-08-30 16:32:06 +0800
commit0237652c579123436e5f48514f733e36c8b5264a (patch)
treea98e04a5c133deb44e00279b87261c6b4fbde1d6 /src/cl_mem.h
parentd47f27ae3ef94671a716d2d4d3c34b77e3b45559 (diff)
Add clEnqueueMapBuffer and clEnqueueMapImage non-blocking map support.
There is a unsync map function drm_intel_gem_bo_map_unsynchronized in drm, that can be used to do non-blocking map. But this function only map gtt, so force to use map gtt for all clEnqueueMapBuffer and clEnqueueMapImage. V2: refined comment, and using map_gtt_unsync in clEnqueueMapBuffer/Image instead of map_auto to avoid confuse. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/cl_mem.h')
-rw-r--r--src/cl_mem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cl_mem.h b/src/cl_mem.h
index a7a6ce45..c0d55039 100644
--- a/src/cl_mem.h
+++ b/src/cl_mem.h
@@ -175,6 +175,9 @@ extern cl_int cl_mem_unmap(cl_mem);
/* Directly map a memory object in GTT mode */
extern void *cl_mem_map_gtt(cl_mem);
+/* Directly map a memory object in GTT mode, with out waiting gpu idle */
+extern void *cl_mem_map_gtt_unsync(cl_mem);
+
/* Unmap a memory object in GTT mode */
extern cl_int cl_mem_unmap_gtt(cl_mem);