From 413f67a65a07a537f0a5fdf49c0e81982f0efa2c Mon Sep 17 00:00:00 2001 From: dolphin8 Date: Mon, 15 Oct 2018 14:54:35 +0800 Subject: [PATCH] fix cl_create_image --- src/framework/cl/cl_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/framework/cl/cl_image.h b/src/framework/cl/cl_image.h index 6e7a229ae4..1c5da6146d 100644 --- a/src/framework/cl/cl_image.h +++ b/src/framework/cl/cl_image.h @@ -197,7 +197,7 @@ class CLImage { cl_int err; cl_image_ = clCreateImage2D( context, // cl_context context - CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR, // cl_mem_flags flags + CL_MEM_READ_WRITE | (imageData ? CL_MEM_COPY_HOST_PTR : 0), // cl_mem_flags flags &cf, // const cl_image_format *image_format width, // size_t image_width height, // size_t image_height -- GitLab