[Beignet] [PATCH] Fix build failure with CMRT enabled

Guo, Yejun yejun.guo at intel.com
Thu Oct 13 00:38:55 UTC 2016


LGTM, thanks.

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Rebecca N. Palmer
Sent: Thursday, October 13, 2016 6:15 AM
To: beignet at lists.freedesktop.org
Subject: [Beignet] [PATCH] Fix build failure with CMRT enabled

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 at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list