[Bf-blender-cvs] [f762d37790b] master: Cycles: enable OpenCL rendering on recent Intel GPUs

Sergey Sharybin noreply at git.blender.org
Fri Dec 11 17:38:12 CET 2020


Commit: f762d37790b55352adc22a1d4c9e2b4953f0eac9
Author: Sergey Sharybin
Date:   Wed Oct 7 16:28:39 2020 +0200
Branches: master
https://developer.blender.org/rBf762d37790b55352adc22a1d4c9e2b4953f0eac9

Cycles: enable OpenCL rendering on recent Intel GPUs

Based on testing by Intel, rendering on Iris GPUs and upcoming Xe GPUs
should work. This is enabled on Windows and Linux.

More testing is needed to verify correctness and performance in production
scenes, but our basic benchmark files seem to give correct results.

===================================================================

M	intern/cycles/device/opencl/opencl_util.cpp

===================================================================

diff --git a/intern/cycles/device/opencl/opencl_util.cpp b/intern/cycles/device/opencl/opencl_util.cpp
index a72fbbad635..a9a474c7d77 100644
--- a/intern/cycles/device/opencl/opencl_util.cpp
+++ b/intern/cycles/device/opencl/opencl_util.cpp
@@ -780,13 +780,25 @@ bool OpenCLInfo::device_supported(const string &platform_name, const cl_device_i
     return true;
   }
 
-  /* It is possible to 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.c_str(), "Iris")) {
+  /* Allow Intel GPUs on Intel OpenCL platform. */
+  if (platform_name.find("Intel") != string::npos) {
+    if (device_type != CL_DEVICE_TYPE_GPU) {
+      /* OpenCL on Intel CPU is not an officially supported configuration.
+       * Use hybrid CPU+GPU rendering to utilize both GPU and CPU. */
+      return false;
+    }
+
+#  ifdef __APPLE__
+    /* Apple uses own framework, which can also put Iris onto AMD framerwork.
+     * This isn't supported configuration. */
     return false;
+#  else
+    if (device_name.find("Iris") != string::npos || device_name.find("Xe") != string::npos) {
+      return true;
+    }
+#  endif
   }
+
   if (platform_name == "AMD Accelerated Parallel Processing" &&
       device_type == CL_DEVICE_TYPE_GPU) {
     if (driver_major < 2236) {



More information about the Bf-blender-cvs mailing list