[Bf-blender-cvs] [9f12ea496a3] master: Fix T80477: Crash when rendering with Embree but denoising with OptiX
Patrick Mours
noreply at git.blender.org
Tue Sep 15 14:58:22 CEST 2020
Commit: 9f12ea496a3f6a0a066e3ed6ec557cc9ec37d776
Author: Patrick Mours
Date: Tue Sep 15 14:57:49 2020 +0200
Branches: master
https://developer.blender.org/rB9f12ea496a3f6a0a066e3ed6ec557cc9ec37d776
Fix T80477: Crash when rendering with Embree but denoising with OptiX
Commit 009971ba7adc9603b90e9bf99b6b6d53eeae6c3a changed it so Cycles creates a separate
Embree device for each Cycles device, but missed the multi-device case. A multi-device with
Embree BVH can occur when CPU rendering is used with OptiX denoising and BVH creation then
failed to get a valid pointer to the Embree device, which crashed. This fixes that by providing the
correct device pointer in the multi-device case as well.
===================================================================
M intern/cycles/device/device_multi.cpp
===================================================================
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 9ea8782d0f0..2e72a0b4393 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -237,6 +237,13 @@ class MultiDevice : public Device {
return true;
}
+ virtual void *bvh_device() const
+ {
+ /* CPU devices will always be at the back, so simply choose the last one.
+ There should only ever be one CPU device anyway and we need the Embree device for it. */
+ return devices.back().device->bvh_device();
+ }
+
virtual void *osl_memory()
{
if (devices.size() > 1) {
More information about the Bf-blender-cvs
mailing list