[Bf-blender-cvs] [6899cb3c073] master: Fix for T77095: work around render artifacts with AMD Radeon RX 4xx and 5xx
Brecht Van Lommel
noreply at git.blender.org
Thu Jun 18 14:41:54 CEST 2020
Commit: 6899cb3c073e8dbd896fdd183a9f405b579634e6
Author: Brecht Van Lommel
Date: Thu Jun 18 14:33:16 2020 +0200
Branches: master
https://developer.blender.org/rB6899cb3c073e8dbd896fdd183a9f405b579634e6
Fix for T77095: work around render artifacts with AMD Radeon RX 4xx and 5xx
===================================================================
M intern/cycles/device/opencl/device_opencl_impl.cpp
===================================================================
diff --git a/intern/cycles/device/opencl/device_opencl_impl.cpp b/intern/cycles/device/opencl/device_opencl_impl.cpp
index beb3174b111..7a84b271878 100644
--- a/intern/cycles/device/opencl/device_opencl_impl.cpp
+++ b/intern/cycles/device/opencl/device_opencl_impl.cpp
@@ -1948,7 +1948,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 ";
+ }
}
}
More information about the Bf-blender-cvs
mailing list