Commit: c4f8aedbc2eb3f54e885ca4c86af6b405fd89c3f Author: Brecht Van Lommel Date: Thu Dec 24 12:55:34 2020 +0100 Branches: master https://developer.blender.org/rBc4f8aedbc2eb3f54e885ca4c86af6b405fd89c3f
Fix T84016: Cycles baking crash with OptiX after recent changes This worked for CPU + GPU, but not GPU only. =================================================================== M intern/cycles/device/device_optix.cpp =================================================================== diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp index 223a9e9d6c0..673fc1752bb 100644 --- a/intern/cycles/device/device_optix.cpp +++ b/intern/cycles/device/device_optix.cpp @@ -1248,6 +1248,12 @@ class OptiXDevice : public CUDADevice { void build_bvh(BVH *bvh, Progress &progress, bool refit) override { + if (bvh->params.bvh_layout == BVH_LAYOUT_BVH2) { + /* For baking CUDA is used, build appropriate BVH for that. */ + Device::build_bvh(bvh, progress, refit); + return; + } + BVHOptiX *const bvh_optix = static_cast<BVHOptiX *>(bvh); progress.set_substatus("Building OptiX acceleration structure"); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs