Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-03-20 17:37:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-03-20 17:37:27 +0300
commit3c4df13924a86355a16774e44b6c5e126001c979 (patch)
treed2ba66c1d2a94dd5acb393012765d6ebead13d51
parentd544a61e8a366f05a6360d9e5baea84edcaa2ca0 (diff)
Fix T50268: Cycles allows to select un supported GPUs for OpenCL
-rw-r--r--intern/cycles/device/opencl/opencl_util.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp
index a689c7eae26..52f8a77c09e 100644
--- a/intern/cycles/device/opencl/opencl_util.cpp
+++ b/intern/cycles/device/opencl/opencl_util.cpp
@@ -605,6 +605,19 @@ bool OpenCLInfo::device_supported(const string& platform_name,
sizeof(cl_device_type),
&device_type,
NULL);
+ char device_name[1024] = "\0";
+ clGetDeviceInfo(device_id,
+ CL_DEVICE_NAME,
+ sizeof(device_name),
+ &device_name,
+ NULL);
+ /* It is possible tyo have Iris GPU on AMD/Apple OpenCL framework
+ * (aka, it will not be on Intel framework). This isn't supported
+ * and needs an explicit blacklist.
+ */
+ if(strstr(device_name, "Iris")) {
+ return false;
+ }
if(platform_name == "AMD Accelerated Parallel Processing" &&
device_type == CL_DEVICE_TYPE_GPU)
{