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.
This commit is contained in:
Sergey Sharybin 2020-10-07 16:28:39 +02:00 committed by Brecht Van Lommel
parent c6626a2f8a
commit f762d37790
1 changed files with 17 additions and 5 deletions

View File

@ -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) {