diff options
author | Yan Wang <yan.wang@linux.intel.com> | 2017-06-12 17:08:24 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-06-13 18:36:21 +0800 |
commit | 8aac2c5df7e343ca1f43f7c2cf0366af02a0f49c (patch) | |
tree | 3e450c6227a336c82b8724a33797203efab02a58 | |
parent | 78e9c99349264b3e6635d1c9ef0a5f83b72286c3 (diff) |
Add clFinish for guarantee the kernel copying is finished when create TILE_Y large image.
Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
-rw-r--r-- | src/cl_mem.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cl_mem.c b/src/cl_mem.c index 3f41fd80..b6dce3f3 100644 --- a/src/cl_mem.c +++ b/src/cl_mem.c @@ -817,6 +817,13 @@ _cl_new_image_copy_from_host_ptr(cl_context ctx, return NULL; } + err = clFinish(ctx->image_queue); + if(err != CL_SUCCESS) { + clReleaseMemObject(buf); + clReleaseMemObject(mem); + return NULL; + } + clReleaseMemObject(buf); if (flags & CL_MEM_USE_HOST_PTR && data) { mem->host_ptr = data; |