[02/19] Runtime: fix clEnqueueMigrateMemObjects fail.

Submitted by Guo Yejun on Dec. 14, 2016, 2:44 a.m.

Details

Message ID 854E8DBA9F41904AB047E03BB6963AE554E215D4@SHSMSX101.ccr.corp.intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 ) in Beignet

Not browsing as part of any series.

Commit Message

Guo Yejun Dec. 14, 2016, 2:44 a.m.
this [PATCH 02/19] looks good to me, thanks.

-----Original Message-----
From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of Yang Rong

Sent: Monday, November 28, 2016 7:32 PM
To: beignet@lists.freedesktop.org
Cc: Yang, Rong R
Subject: [Beignet] [PATCH 02/19] Runtime: fix clEnqueueMigrateMemObjects fail.

clEnqueueMigrateMemObjects's parameter may be clBuffer or clImage, so should call CL_OBJECT_IS_MEM.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>

---
 src/cl_api_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.1.4

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

Patch hide | download patch | download mbox

diff --git a/src/cl_api_mem.c b/src/cl_api_mem.c index 054c37a..7314a48 100644
--- a/src/cl_api_mem.c
+++ b/src/cl_api_mem.c
@@ -1177,7 +1177,7 @@  clEnqueueMigrateMemObjects(cl_command_queue command_queue,
     }
 
     for (i = 0; i < num_mem_objects; i++) {
-      if (!CL_OBJECT_IS_BUFFER(mem_objects[i])) {
+      if (!CL_OBJECT_IS_MEM(mem_objects[i])) {
         err = CL_INVALID_MEM_OBJECT;
         break;
       }