2baff9c moved mem->magic to cl_base_object.
---
(Or should this be CL_OBJECT_IS_MEM(mem), i.e. also checking the reference 
count?)

--- a/src/cl_cmrt.cpp
+++ b/src/cl_cmrt.cpp
@@ -256,7 +256,7 @@ cl_int cmrt_set_kernel_arg(cl_kernel k,
     result = cmrt_kernel->SetKernelArg(index, sz, value);
   else {
     cl_mem mem = *(cl_mem*)value;
-    if (mem->magic == CL_MAGIC_MEM_HEADER) {
+    if (((cl_base_object)mem)->magic == CL_MAGIC_MEM_HEADER) {
       if (!CreateCmrtMemory(mem))
         return CL_INVALID_ARG_VALUE;
 

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to