CL: Fixed a get image info bug on 64 bit system.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Mon, 20 May 2013 07:48:16 +0000 (15:48 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Mon, 20 May 2013 07:49:27 +0000 (15:49 +0800)
Forgot to merge it with previous patch. Now commit this one
separately to fix the bug on 64 bit system.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: Simon Richter <simon.richter@hogyros.de>
src/cl_command_queue.c

index 04c26bb..6ce9016 100644 (file)
@@ -102,9 +102,9 @@ static void
 set_image_info(char *curbe, struct ImageInfo * image_info, cl_mem image)
 {
   if (image_info->wSlot >= 0)
-    memcpy(curbe + image_info->wSlot, &image->w, sizeof(image->w));
+    *(uint32_t*)(curbe + image_info->wSlot) = image->w;
   if (image_info->hSlot >= 0)
-    memcpy(curbe + image_info->hSlot, &image->h, sizeof(image->h));
+    *(uint32_t*)(curbe + image_info->hSlot) = image->h;
 }
 
 LOCAL cl_int