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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-10-07 17:28:39 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-12-11 19:37:54 +0300
commitf762d37790b55352adc22a1d4c9e2b4953f0eac9 (patch)
tree97441cedb4c5111854226a46065577a8196cb751 /intern
parentc6626a2f8adebb2d7e6ae1ef743d7faf1139b5ae (diff)
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.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/opencl/opencl_util.cpp22
1 files changed, 17 insertions, 5 deletions
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) {