summaryrefslogtreecommitdiff
path: root/utests/utest_helper.cpp
diff options
context:
space:
mode:
authorJesper Pedersen <jesper.pedersen@comcast.net>2014-04-13 09:58:12 -0400
committerZhigang Gong <zhigang.gong@intel.com>2014-04-17 10:43:56 +0800
commitf9bb58ff731a296951af6650dd16fa579c49d1fc (patch)
tree016ffb68e45341d5deb73753076bec90daadae3d /utests/utest_helper.cpp
parentcecd52124bfd7c79108e36cae549354b16c2ef4e (diff)
downloadbeignet-f9bb58ff731a296951af6650dd16fa579c49d1fc.tar.gz
Mark SandyBridge as unsupported
Signed-off-by: Jesper Pedersen <jesper.pedersen@comcast.net> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'utests/utest_helper.cpp')
-rw-r--r--utests/utest_helper.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp
index a9e270ea..cb4dd665 100644
--- a/utests/utest_helper.cpp
+++ b/utests/utest_helper.cpp
@@ -337,20 +337,26 @@ cl_ocl_init(void)
GET_PLATFORM_STR_INFO(extensions, EXTENSIONS);
/* Get the device (only GPU device is supported right now) */
- OCL_CALL (clGetDeviceIDs, platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);
- {
- size_t param_value_size;
- GET_DEVICE_STR_INFO(profile, PROFILE);
- GET_DEVICE_STR_INFO(name, NAME);
- GET_DEVICE_STR_INFO(vendor, VENDOR);
- GET_DEVICE_STR_INFO(version, VERSION);
- GET_DEVICE_STR_INFO(extensions, EXTENSIONS);
- GET_DEVICE_STR_INFO(opencl_c_version, OPENCL_C_VERSION);
+ try {
+ OCL_CALL (clGetDeviceIDs, platform, CL_DEVICE_TYPE_GPU, 1, &device, NULL);
+ {
+ size_t param_value_size;
+ GET_DEVICE_STR_INFO(profile, PROFILE);
+ GET_DEVICE_STR_INFO(name, NAME);
+ GET_DEVICE_STR_INFO(vendor, VENDOR);
+ GET_DEVICE_STR_INFO(version, VERSION);
+ GET_DEVICE_STR_INFO(extensions, EXTENSIONS);
+ GET_DEVICE_STR_INFO(opencl_c_version, OPENCL_C_VERSION);
#ifdef HAS_EGL
- if (std::strstr(extensionsStr.c_str(), "cl_khr_gl_sharing")) {
- hasGLExt = true;
- }
+ if (std::strstr(extensionsStr.c_str(), "cl_khr_gl_sharing")) {
+ hasGLExt = true;
+ }
#endif
+ }
+ } catch (...) {
+ fprintf(stderr, "error calling clGetDeviceIDs\n");
+ status = CL_DEVICE_NOT_FOUND;
+ goto error;
}
#ifdef HAS_EGL