Fix T103393: Cycles: Undefine __LIGHT_TREE__ on Metal/AMD to fix perf

This patch fixes T103393 by undefining `__LIGHT_TREE__` on Metal/AMD as it has an unexpected & major impact on performance even when light trees are not in use.

Patch authored by Prakash Kamliya.

Reviewed By: brecht

Maniphest Tasks: T103393

Differential Revision: https://developer.blender.org/D17167
This commit is contained in:
Michael Jones 2023-02-06 11:12:22 +00:00 committed by Michael Jones
parent 6d297c35c8
commit 0a3df611e7
Notes: blender-bot 2023-02-14 06:05:22 +01:00
Referenced by issue #103393, Cycles render time regression with AMD GPUs on macOS
2 changed files with 6 additions and 1 deletions

View File

@ -55,6 +55,10 @@ void device_metal_info(vector<DeviceInfo> &devices)
info.denoisers = DENOISER_NONE;
info.id = id;
if (MetalInfo::get_device_vendor(device) == METAL_GPU_AMD) {
info.has_light_tree = false;
}
devices.push_back(info);
device_index++;
}

View File

@ -74,7 +74,8 @@ CCL_NAMESPACE_BEGIN
#define __VOLUME__
/* TODO: solve internal compiler errors and enable light tree on HIP. */
#ifdef __KERNEL_HIP__
/* TODO: solve internal compiler perf issue and enable light tree on Metal/AMD. */
#if defined(__KERNEL_HIP__) || defined(__KERNEL_METAL_AMD__)
# undef __LIGHT_TREE__
#endif