ICD dispatch table must be first
authorSimon Richter <Simon.Richter@hogyros.de>
Sat, 28 Sep 2013 04:39:50 +0000 (06:39 +0200)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Tue, 8 Oct 2013 07:08:29 +0000 (15:08 +0800)
The ICD loader expects the first member of any dispatchable object to be
the dispatch table.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
src/cl_mem.h

index ca601f9..3d72ed3 100644 (file)
@@ -73,8 +73,8 @@ enum cl_mem_type {
 #define IS_GL_IMAGE(mem) (mem->type == CL_MEM_GL_IMAGE_TYPE)
 
 typedef  struct _cl_mem {
-  uint64_t magic;           /* To identify it as a memory object */
   DEFINE_ICD(dispatch)
+  uint64_t magic;           /* To identify it as a memory object */
   cl_mem prev, next;        /* We chain the memory buffers together */
   enum cl_mem_type type;
   volatile int ref_n;       /* This object is reference counted */