]> granicus.if.org Git - handbrake/commitdiff
OpenCL: only allow "AMD" vendor name under OS X for now.
authorRodeo <tdskywalker@gmail.com>
Mon, 20 May 2013 18:18:25 +0000 (18:18 +0000)
committerRodeo <tdskywalker@gmail.com>
Mon, 20 May 2013 18:18:25 +0000 (18:18 +0000)
Also, set the correct gpu_info for that vendor name.

git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5488 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/openclwrapper.c

index 8c6796629a46b21e71d94ae8e23cb1a162e9e923..9118c1ee4ee1cc8e817a11ec735cb83e179f86de 100644 (file)
@@ -136,9 +136,11 @@ int hb_confirm_gpu_type()
                 char dbuff[100];\r
                 status = clGetDeviceInfo(devices[j], CL_DEVICE_VENDOR, sizeof(dbuff), dbuff, NULL); \r
                 if(!strcmp(dbuff, "Advanced Micro Devices, Inc.") ||\r
-                   !strcmp(dbuff, "NVIDIA Corporation")           ||\r
+#ifdef __APPLE__\r
+                   !strcmp(dbuff, "AMD")                          ||\r
                    /* MacBook Pro, AMD Radeon HD 6750M, OS X 10.8 */\r
-                   !strcmp(dbuff, "AMD"))\r
+#endif\r
+                   !strcmp(dbuff, "NVIDIA Corporation"))\r
                 {\r
                     return 0;\r
                 }\r
@@ -559,7 +561,8 @@ int hb_init_opencl_env( GPUEnv *gpu_info )
                 }\r
                 gpu_info->platform = platforms[i];\r
 \r
-                if( !strcmp( platformName, "Advanced Micro Devices, Inc." ))\r
+                if (!strcmp(platformName, "Advanced Micro Devices, Inc.") ||\r
+                    !strcmp(platformName, "AMD"))\r
                     gpu_info->vendor = AMD;\r
                 else \r
                     gpu_info->vendor = others;\r