diff options
author | maxd <[email protected]> | 2013-10-11 15:29:29 +0000 |
---|---|---|
committer | maxd <[email protected]> | 2013-10-11 15:29:29 +0000 |
commit | 66009cb19c3ba6b6a27fc4bcbf1373cb90307a80 (patch) | |
tree | 6c914e106dae4c81a0c70ccf821aadf07252ab9d /libhb/openclwrapper.c | |
parent | e37de0578bba59362c27ad636d9bf20085a47388 (diff) |
HW: fix for compile and runtime behavior and support of the features/RB601
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5833 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/openclwrapper.c')
-rw-r--r-- | libhb/openclwrapper.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libhb/openclwrapper.c b/libhb/openclwrapper.c index adc0f38b3..515297523 100644 --- a/libhb/openclwrapper.c +++ b/libhb/openclwrapper.c @@ -1181,6 +1181,8 @@ void hb_opencl_info_print() if (devices[i] != NULL) { char vendor[100], name[1024], version[1024]; + cl_device_type device_type; + char *device_type_name = "Unknown"; clGetDeviceInfo(devices[i], CL_DEVICE_VENDOR, sizeof(vendor), vendor, NULL); @@ -1188,9 +1190,24 @@ void hb_opencl_info_print() name, NULL); clGetDeviceInfo(devices[i], CL_DRIVER_VERSION, sizeof(version), version, NULL); + clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), + &device_type, NULL); + + if (device_type & CL_DEVICE_TYPE_GPU) + device_type_name = "GPU"; + else + if (device_type & CL_DEVICE_TYPE_CPU) + device_type_name = "CPU"; + else + if (device_type & CL_DEVICE_TYPE_ACCELERATOR) + device_type_name = "Accelerator"; + else + if (device_type & CL_DEVICE_TYPE_CUSTOM) + device_type_name = "Custom"; hb_log("GPU #%d: %s %s", i + 1, vendor, name); hb_log(" - driver version: %s", version); + hb_log(" - OpenCL device type: %s%s",device_type_name,device_type & CL_DEVICE_TYPE_DEFAULT ? "/Default" : ""); } } |