diff options
author | Rodeo <[email protected]> | 2013-12-11 02:24:48 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-12-11 02:24:48 +0000 |
commit | 3443d1134af988467ef8ac4f2808f5e325ef4eb4 (patch) | |
tree | 2f3658d789c71ad94da41bbf1ce5f3edf81aadf2 | |
parent | c872cbbc2a7817b2b938febeb3fdab36e6bfa570 (diff) |
OpenCL: disable on Ivy Bridge integrated GPUs.
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
-rw-r--r-- | libhb/opencl.c | 9 | ||||
-rw-r--r-- | libhb/opencl.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/libhb/opencl.c b/libhb/opencl.c index 8d846a824..d9bfc89b2 100644 --- a/libhb/opencl.c +++ b/libhb/opencl.c @@ -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; diff --git a/libhb/opencl.h b/libhb/opencl.h index 5548a9eb6..a31918d39 100644 --- a/libhb/opencl.h +++ b/libhb/opencl.h @@ -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; |