diff options
author | Patrick Mours <pmours@nvidia.com> | 2020-03-05 18:28:31 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2020-03-05 18:28:31 +0300 |
commit | 88db9a17ce70c4553be1922e3ecef091e8c1d039 (patch) | |
tree | e3fd1cc49749ea1a20d43a482a6a496e3c341895 /intern | |
parent | fe7528ee919ba75a1216aad3257faede33cbac14 (diff) |
Fix T74393: Cycles crashes when both OSL and Optix Denoising are enabled
Enabling viewport denoising causes Cycles to use a multi-device, which always returned NULL when
asked for OSL memory and would subsequently crash. This fixes that by returning the correct OSL
memory pointer from the CPU device in the special viewport denoising multi-device.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/device/device_multi.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp index 0044610eeb4..631c4169e2e 100644 --- a/intern/cycles/device/device_multi.cpp +++ b/intern/cycles/device/device_multi.cpp @@ -183,6 +183,14 @@ class MultiDevice : public Device { return true; } + virtual void *osl_memory() + { + if (devices.size() > 1) { + return NULL; + } + return devices.front().device->osl_memory(); + } + void mem_alloc(device_memory &mem) { device_ptr key = unique_key++; |