[Beignet] [PATCH 3/3] Add missing code.

xionghu.luo at intel.com xionghu.luo at intel.com
Tue Mar 31 17:48:27 PDT 2015


From: Luo Xionghu <xionghu.luo at intel.com>

region0 is not initialized.

Signed-off-by: Chuanbo Weng <chuanbo.weng at intel.com>
---
 src/cl_mem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/cl_mem.c b/src/cl_mem.c
index d3e92f1..0a2613d 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -1833,6 +1833,7 @@ cl_mem_copy_buffer_to_image(cl_command_queue queue, cl_mem buffer, struct _cl_me
   intel_fmt = image->intel_fmt;
   bpp = image->bpp;
   w_saved = image->w;
+  region0 = region[0] * bpp;
   kn_src_offset = src_offset;
   if((image->image_type == CL_MEM_OBJECT_IMAGE2D) && ((image->w * image->bpp) % 16 == 0) &&
       ((dst_origin[0] * bpp) % 16 == 0) && (region0 % 16 == 0) && (src_offset % 16 == 0)){
-- 
1.9.1



More information about the Beignet mailing list