Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/device/device_multi.cpp')
-rw-r--r--intern/cycles/device/device_multi.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 4a40e106115..ac71be9dbea 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -153,6 +153,24 @@ class MultiDevice : public Device {
return result;
}
+ bool build_optix_bvh(BVH *bvh, device_memory &mem)
+ {
+ device_ptr key = unique_key++;
+
+ // Broadcast acceleration structure build to all devices
+ foreach (SubDevice &sub, devices) {
+ mem.device = sub.device;
+ if (!sub.device->build_optix_bvh(bvh, mem))
+ return false;
+ sub.ptr_map[key] = mem.device_pointer;
+ }
+
+ mem.device = this;
+ mem.device_pointer = key;
+ stats.mem_alloc(mem.device_size);
+ return true;
+ }
+
void mem_alloc(device_memory &mem)
{
device_ptr key = unique_key++;