intel_ivb_gt2_device.platform = intel_platform;
ret = &intel_ivb_gt2_device;
break;
+
+ case PCI_CHIP_SANDYBRIDGE_BRIDGE:
+ case PCI_CHIP_SANDYBRIDGE_GT1:
+ case PCI_CHIP_SANDYBRIDGE_GT2:
+ case PCI_CHIP_SANDYBRIDGE_GT2_PLUS:
+ case PCI_CHIP_SANDYBRIDGE_BRIDGE_M:
+ case PCI_CHIP_SANDYBRIDGE_M_GT1:
+ case PCI_CHIP_SANDYBRIDGE_M_GT2:
+ case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
+ case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
+ case PCI_CHIP_SANDYBRIDGE_S_GT:
+ // Intel(R) HD Graphics SandyBridge not supported yet
+ ret = NULL;
+ break;
default:
- printf("cl_get_gt_device(): error, unknown device\n");
- exit(1);
+ printf("cl_get_gt_device(): error, unknown device: %x\n", device_id);
}
return ret;
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