summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca N. Palmer <rebecca_palmer@zoho.com>2016-10-08 14:26:05 +0100
committerYang Rong <rong.r.yang@intel.com>2016-10-21 12:43:46 +0800
commit16b1dfb5297f5875de97d6d3a33397716ba9bf45 (patch)
treeb2f3c6228bb79aee22caed9e16e129ef37ab1904
parentefc0a2cfe05c1efd1118ebe142233e6063e0c18b (diff)
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>
-rw-r--r--utests/utest_helper.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
index 70a69cc1..a97f809c 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;
}