Fix #123763: Cycles Metal renders with MNEE stuck on some Macs

On some Macs, MNEE would be disabled in Cycles to work around a bug.
However this just led to these devices skipping over MNEE related
parts of the rendering pipeline and not properly progressing through
the render.

This commit fixes this issue by properly disabling MNEE on these devices.

Pull Request: https://projects.blender.org/blender/blender/pulls/123765
This commit is contained in:
Alaska 2024-06-26 14:15:01 +02:00 committed by Sergey Sharybin
parent b120440f7c
commit 3232458152
2 changed files with 9 additions and 2 deletions

@ -73,7 +73,13 @@ void device_metal_info(vector<DeviceInfo> &devices)
info.has_nanovdb = vendor == METAL_GPU_APPLE;
info.has_light_tree = vendor != METAL_GPU_AMD;
/* MNEE caused "Compute function exceeds available temporary registers" in macOS < 13 due to a
* bug in spill buffer allocation sizing. */
info.has_mnee = false;
if (@available(macos 13.0, *)) {
info.has_mnee = vendor != METAL_GPU_AMD;
}
info.use_hardware_raytracing = false;

@ -546,7 +546,8 @@ void Scene::update_kernel_features()
}
dscene.data.integrator.use_caustics = false;
if (has_caustics_caster && has_caustics_receiver && has_caustics_light) {
if (device->info.has_mnee && has_caustics_caster && has_caustics_receiver && has_caustics_light)
{
dscene.data.integrator.use_caustics = true;
kernel_features |= KERNEL_FEATURE_MNEE;
}