[Beignet] [PATCH v4 5/7] Add clFinish for guarantee the kernel copying is finished when create TILE_Y large image.
yan.wang at linux.intel.com
yan.wang at linux.intel.com
Mon Jun 12 09:08:24 UTC 2017
From: Yan Wang <yan.wang at linux.intel.com>
Signed-off-by: Yan Wang <yan.wang at linux.intel.com>
---
src/cl_mem.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/cl_mem.c b/src/cl_mem.c
index 3f41fd8..b6dce3f 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;
--
2.7.4
More information about the Beignet
mailing list