Because clGetExtensionFunctionAddressForPlatform is available from OpenCL 1.2, I think it is better to add the opencl version check, just as clCreateImageFromLibvaIntel in the utest runtime_climage_from_boname.cpp. Anyway, it is a refinement so I have merged it.
> -----Original Message----- > From: Beignet [mailto:[email protected]] On Behalf Of > Rebecca N. Palmer > Sent: Saturday, October 8, 2016 21:26 > To: [email protected] > Subject: [Beignet] [PATCH] 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. > --- > utests/utest_helper.cpp | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index > d12dccf..d3fc069 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,"clGetKernelSubGroup > + InfoKHR"); if(utestclGetKernelSubGroupInfoKHR == NULL) { > + printf("Can't find clGetKernelSubGroupInfoKHR"); > + OCL_ASSERT(0); > + } > return 1; > } > > -- > 2.1.4 > > > _______________________________________________ > Beignet mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet
