fix clGetKernelWorkGroupInfo built-in kernel fail.
authorLuo Xionghu <xionghu.luo@intel.com>
Wed, 10 Sep 2014 03:31:32 +0000 (11:31 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Thu, 11 Sep 2014 05:42:31 +0000 (13:42 +0800)
commit55ac17eba32cb440f09a0cef63d0675ce9ebbfbb
tree60589684e8786a6abfe04d8c461a66da1188cc96
parentee4e915ada224fda3fc589da141778be1f9e07ab
fix clGetKernelWorkGroupInfo built-in kernel fail.

add CL_KERNEL_GLOBAL_WORK_SIZE option for clGetKernelWorkGroupInfo.

v2: should return the max global work size instead of current work size.
This funtion need return CL_INVALID_VALUE if the device is not a custom
device or kernel is not a built-in kernel.
we have 3 kind of built-in kernels for 1d/2d/3d memories, the max global
work size are decided by the dimension and memory type.
the piglit fail is caused by calling NON built-in kernels, so need send
patch to piglit later.

Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
src/cl_device_id.c
src/cl_device_id.h
src/cl_gt_device.h
src/cl_kernel.h
utests/CMakeLists.txt
utests/builtin_kernel_max_global_size.cpp [new file with mode: 0644]