Skip to content

Commit

Permalink
fix clGetMemObjectInfo of CL_MEM_HOST_PTR after fix in CTS (#680)
Browse files Browse the repository at this point in the history
* fix clGetMemObjectInfo of CL_MEM_HOST_PTR after fix in CTS

KhronosGroup/OpenCL-CTS#1850

* Update src/api.cpp

Co-authored-by: Kévin Petit <kpet@free.fr>

---------

Co-authored-by: Kévin Petit <kpet@free.fr>
  • Loading branch information
rjodinchr and kpet authored Mar 18, 2024
1 parent 53a962d commit 4078c37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,10 @@ cl_int CLVK_API_CALL clGetMemObjectInfo(cl_mem mem, cl_mem_info param_name,
ret_size = sizeof(val_sizet);
break;
case CL_MEM_HOST_PTR:
val_ptr = memobj->host_ptr();
val_ptr = nullptr;
if (memobj->has_any_flag(CL_MEM_USE_HOST_PTR)) {
val_ptr = memobj->host_ptr();
}
copy_ptr = &val_ptr;
ret_size = sizeof(val_ptr);
break;
Expand Down

0 comments on commit 4078c37

Please sign in to comment.