diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2014-10-23 15:19:22 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-10-24 18:12:29 +0800 |
commit | 8b0850587b80847056c9d798642fd8a7155fe3c3 (patch) | |
tree | e2eaae3f53d84ac8d344785290f49f55ee0372d6 /src/cl_enqueue.h | |
parent | e74164f951ba9003f92d14d685f184617da056eb (diff) |
Make use of write enable flag for mem bo map
Use drm/intel optimization for mem bo mapping in case of read or write.
So we could be possibly waiting less.
This also adds 'map_flags' check in clEnqueueMapBuffer/clEnqueueMapImage
for actual read or write mapping.
But currently leave clMapBufferIntel untouched which might break ABI/API.
v2: Fix write_map flag in clEnqueueMapBuffer/clEnqueueMapImage.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: "Guo, Yejun" <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src/cl_enqueue.h')
-rw-r--r-- | src/cl_enqueue.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cl_enqueue.h b/src/cl_enqueue.h index a9b36017..b179f782 100644 --- a/src/cl_enqueue.h +++ b/src/cl_enqueue.h @@ -65,6 +65,7 @@ typedef struct _enqueue_data { void * ptr; /* Ptr for write and return value */ const cl_mem* mem_list; /* mem_list of clEnqueueNativeKernel */ uint8_t unsync_map; /* Indicate the clEnqueueMapBuffer/Image is unsync map */ + uint8_t write_map; /* Indicate if the clEnqueueMapBuffer is write enable */ void (*user_func)(void *); /* pointer to a host-callable user function */ } enqueue_data; |