]> granicus.if.org Git - handbrake/commitdiff
OpenCL: disable on Ivy Bridge integrated GPUs.
authorRodeo <tdskywalker@gmail.com>
Wed, 11 Dec 2013 02:24:48 +0000 (02:24 +0000)
committerRodeo <tdskywalker@gmail.com>
Wed, 11 Dec 2013 02:24:48 +0000 (02:24 +0000)
Ivy Bridge supports OpenCL on GPU, but it's too slow to be usable for scaling.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5926 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/opencl.c
libhb/opencl.h

index 8d846a824ead9bd9a8bdd984c8959ac1edc9a8ea..d9bfc89b2ccb88205bfa03ef0e0413e7f171ad98 100644 (file)
@@ -161,10 +161,13 @@ void hb_opencl_library_close(hb_opencl_library_t **_opencl)
 static int hb_opencl_device_is_supported(hb_opencl_device_t* device)
 {
     // we only support OpenCL on GPUs for now
+    // Ivy Bridge supports OpenCL on GPU, but it's too slow to be usable
     // FIXME: disable on NVIDIA to to a bug
     if ((device != NULL) &&
         (device->type & CL_DEVICE_TYPE_GPU) &&
-        (device->ocl_vendor != HB_OCL_VENDOR_NVIDIA))
+        (device->ocl_vendor != HB_OCL_VENDOR_NVIDIA) &&
+        (device->ocl_vendor != HB_OCL_VENDOR_INTEL ||
+         hb_get_cpu_platform() != HB_CPU_PLATFORM_INTEL_IVB))
     {
         int major, minor;
         // check OpenCL version:
@@ -230,6 +233,10 @@ static hb_opencl_device_t* hb_opencl_device_get(hb_opencl_library_t *opencl,
     {
         device->ocl_vendor = HB_OCL_VENDOR_NVIDIA;
     }
+    else if (!strncmp(device->vendor, "Intel", 5 /* strlen("Intel") */))
+    {
+        device->ocl_vendor = HB_OCL_VENDOR_INTEL;
+    }
     else
     {
         device->ocl_vendor = HB_OCL_VENDOR_OTHER;
index 5548a9eb6590ab5af34d804dba1fdb68450363f2..a31918d3949c18bee796cfa09c43a4bdd1088724 100644 (file)
@@ -690,6 +690,7 @@ typedef struct hb_opencl_device_s
     {
         HB_OCL_VENDOR_AMD,
         HB_OCL_VENDOR_NVIDIA,
+        HB_OCL_VENDOR_INTEL,
         HB_OCL_VENDOR_OTHER,
     } ocl_vendor;
 } hb_opencl_device_t;