diff options
author | Luo <xionghu.luo@intel.com> | 2014-09-12 11:53:41 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-12 16:42:56 +0800 |
commit | a6ca297b403e3b729eb13bc5425ac7f64bacdab3 (patch) | |
tree | b796aa8e4d3f734b8f722e788baa36f60427fadf /utests/compiler_function_qualifiers.cpp | |
parent | 44a2c4f5455980221a179c95fb7f8a4c024bcb94 (diff) | |
download | beignet-a6ca297b403e3b729eb13bc5425ac7f64bacdab3.tar.gz |
fix piglit get kernel info FUNCTION ATTRIBUTE fail.
the backend need return the kernel FUNCTION ATTRIBUTE message to the
clGetKernelInfo.
there are 3 kind of function attribute so far, vec_type_hint parameter
is not available to return due to llvm lack of such info.
Signed-off-by: Luo <xionghu.luo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/compiler_function_qualifiers.cpp')
-rw-r--r-- | utests/compiler_function_qualifiers.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/utests/compiler_function_qualifiers.cpp b/utests/compiler_function_qualifiers.cpp index 55ddd84b..622313c5 100644 --- a/utests/compiler_function_qualifiers.cpp +++ b/utests/compiler_function_qualifiers.cpp @@ -3,6 +3,16 @@ void compiler_function_qualifiers(void) { OCL_CREATE_KERNEL("compiler_function_qualifiers"); + + size_t param_value_size; + void* param_value; + cl_int err; + + err = clGetKernelInfo(kernel, CL_KERNEL_ATTRIBUTES, 0, NULL, ¶m_value_size); + OCL_ASSERT(err == CL_SUCCESS); + param_value = malloc(param_value_size); + err = clGetKernelInfo(kernel, CL_KERNEL_ATTRIBUTES, param_value_size, param_value, NULL); + OCL_ASSERT(err == CL_SUCCESS); } MAKE_UTEST_FROM_FUNCTION(compiler_function_qualifiers); |