diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-12-24 14:55:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-12-24 14:59:35 +0300 |
commit | c4f8aedbc2eb3f54e885ca4c86af6b405fd89c3f (patch) | |
tree | 2380786295fe22c6b4513d25197a7be6b764d7d7 /intern/cycles | |
parent | 2221389d6e8e799ae1a001e4a3457fa5c3fd90fb (diff) |
Fix T84016: Cycles baking crash with OptiX after recent changes
This worked for CPU + GPU, but not GPU only.
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/device/device_optix.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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"); |