diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2020-09-01 15:47:34 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2020-09-01 22:00:55 +0300 |
commit | 009971ba7adc9603b90e9bf99b6b6d53eeae6c3a (patch) | |
tree | 0034d9a0a5703069816439564729a17740e0e727 /intern/cycles/render | |
parent | f2d26409e83b1769c3a4baa2e5fa80e944f74678 (diff) |
Cycles: Separate Embree device for each CPU Device.
Before, Cycles was using a shared Embree device across all instances.
This could result in crashes when viewport rendering and material
preview were using Cycles simultaneously.
Fixes issue T80042
Maniphest Tasks: T80042
Differential Revision: https://developer.blender.org/D8772
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/geometry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp index 71540dc9c7b..894adafa6e6 100644 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@ -215,7 +215,7 @@ void Geometry::compute_bvh( bparams.curve_subdivisions = params->curve_subdivisions(); delete bvh; - bvh = BVH::create(bparams, geometry, objects); + bvh = BVH::create(bparams, geometry, objects, device); MEM_GUARDED_CALL(progress, bvh->build, *progress); } } @@ -1030,7 +1030,7 @@ void GeometryManager::device_update_bvh(Device *device, VLOG(1) << "Using " << bvh_layout_name(bparams.bvh_layout) << " layout."; - BVH *bvh = BVH::create(bparams, scene->geometry, scene->objects); + BVH *bvh = BVH::create(bparams, scene->geometry, scene->objects, device); bvh->build(progress, &device->stats); if (progress.get_cancel()) { |