Fix for T77095: work around render artifacts with AMD Radeon RX 4xx and 5xx
This commit is contained in:
parent
d114288f90
commit
0148059c68
Notes:
blender-bot
2023-02-14 10:14:07 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
|
@ -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 ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue