diff options
author | Rebecca N. Palmer <rebecca_palmer@zoho.com> | 2016-10-08 14:26:05 +0100 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2016-10-10 22:30:40 +0800 |
commit | 4fff269be888225c01eb46eba24448efd4106e24 (patch) | |
tree | 9d4477f5c8abe025867c8d835e7df6d8d0146fcc /utests/utest_helper.cpp | |
parent | cce1b65ed7db2825005b3a8c9e940ca7d05d5167 (diff) | |
download | beignet-4fff269be888225c01eb46eba24448efd4106e24.tar.gz |
Utests: use clGetExtensionFunctionAddressForPlatform
This is required to find KHR extensions via ICD, as the loader needs to
know which ICD to send the request to.
If the function is not found, fail the test instead of crashing.
Signed-off-by: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'utests/utest_helper.cpp')
-rw-r--r-- | utests/utest_helper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index d12dccf7..d3fc069e 100644 --- a/utests/utest_helper.cpp +++ b/utests/utest_helper.cpp @@ -891,7 +891,11 @@ int cl_check_subgroups(void) return 0; } if(utestclGetKernelSubGroupInfoKHR == NULL) - utestclGetKernelSubGroupInfoKHR = (clGetKernelSubGroupInfoKHR_cb*) clGetExtensionFunctionAddress("clGetKernelSubGroupInfoKHR"); + utestclGetKernelSubGroupInfoKHR = (clGetKernelSubGroupInfoKHR_cb*) clGetExtensionFunctionAddressForPlatform(platform,"clGetKernelSubGroupInfoKHR"); + if(utestclGetKernelSubGroupInfoKHR == NULL) { + printf("Can't find clGetKernelSubGroupInfoKHR"); + OCL_ASSERT(0); + } return 1; } |