enable CL_DEVICE_HOST_UNIFIED_MEMORY when userptr is supported
authorGuo Yejun <yejun.guo@intel.com>
Fri, 7 Nov 2014 08:19:46 +0000 (16:19 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 7 Nov 2014 08:00:46 +0000 (16:00 +0800)
commit99e3b583f0d5837601670ca3486cb5ecfd8bf1a1
tree9d36bc12724f51cf9aae4c859b913710545ab033
parent075390db926de7bfd2ac853404ab1bcfc8b9c650
enable CL_DEVICE_HOST_UNIFIED_MEMORY when userptr is supported

userptr is firstly checked at compile time with libdrm version, but
it does not ensure the system has such capability (for exmaple, with
old linux kernel), so also take a check at run time for the device info.

V2: add runtime check to see if userptr is really supported
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
src/cl_device_id.c
src/cl_gt_device.h