diff options
author | Yang Rong <rong.r.yang@intel.com> | 2013-08-23 11:04:21 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2013-08-30 16:32:06 +0800 |
commit | 0237652c579123436e5f48514f733e36c8b5264a (patch) | |
tree | a98e04a5c133deb44e00279b87261c6b4fbde1d6 /src/cl_mem.h | |
parent | d47f27ae3ef94671a716d2d4d3c34b77e3b45559 (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.h | 3 |
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); |