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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-12-24 14:55:34 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-12-24 14:59:35 +0300
commitc4f8aedbc2eb3f54e885ca4c86af6b405fd89c3f (patch)
tree2380786295fe22c6b4513d25197a7be6b764d7d7 /intern
parent2221389d6e8e799ae1a001e4a3457fa5c3fd90fb (diff)
Fix T84016: Cycles baking crash with OptiX after recent changes
This worked for CPU + GPU, but not GPU only.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/device_optix.cpp6
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");