diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-06-18 15:33:16 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-06-25 10:28:30 +0300 |
commit | 0148059c684e1325ab3210156d7fe6125cf27276 (patch) | |
tree | cb185da65c7b67580a03b2b7d2dcb0fca1c3a44d | |
parent | d114288f90a8fbb2675d802f7e13f25fbee75801 (diff) |
Fix for T77095: work around render artifacts with AMD Radeon RX 4xx and 5xx
-rw-r--r-- | intern/cycles/device/opencl/device_opencl_impl.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/intern/cycles/device/opencl/device_opencl_impl.cpp b/intern/cycles/device/opencl/device_opencl_impl.cpp index 2766f85d17c..f9a6552d484 100644 --- a/intern/cycles/device/opencl/device_opencl_impl.cpp +++ b/intern/cycles/device/opencl/device_opencl_impl.cpp @@ -1903,7 +1903,15 @@ string OpenCLDevice::kernel_build_options(const string *debug_src) int version_major, version_minor; if (OpenCLInfo::get_device_version(cdDevice, &version_major, &version_minor)) { if (version_major >= 2) { - build_options += "-cl-std=CL2.0 "; + /* This appears to trigger a driver bug in Radeon RX cards, so we + * don't use OpenCL 2.0 for those. */ + string device_name = OpenCLInfo::get_readable_device_name(cdDevice); + if (!(string_startswith(device_name, "Radeon RX 4") || + string_startswith(device_name, "Radeon (TM) RX 4") || + string_startswith(device_name, "Radeon RX 5") || + string_startswith(device_name, "Radeon (TM) RX 5"))) { + build_options += "-cl-std=CL2.0 "; + } } } |