Alternative Upload geometry data in parallel to multiple GPUs using the "Multi-Device" #107552

Open
William Leeson wants to merge 137 commits from leesonw/blender-cluster:upload_changed into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 13 additions and 3 deletions
Showing only changes of commit e04384f20d - Show all commits

View File

@ -22,9 +22,19 @@ BVHMulti::~BVHMulti() { }
BVH *BVHMulti::get_device_bvh(const Device *subdevice)
{
int id = device->device_number(subdevice);
resize_sub_bvhs_if_needed(id);
return sub_bvhs[id].get();
BVH *bvh = NULL;
if (subdevice == device) {
bvh = this;
}
else {
int id = device->device_number(subdevice);
assert(id != -1);
if (id != -1) {
resize_sub_bvhs_if_needed(id);
bvh = sub_bvhs[id].get();
}
}
return bvh;
}
void BVHMulti::set_device_bvh(const Device *subdevice, BVH *bvh)