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:
authorPatrick Mours <pmours@nvidia.com>2020-01-10 18:03:11 +0300
committerPatrick Mours <pmours@nvidia.com>2020-01-10 18:03:11 +0300
commit89578a8f6eddd72f3e81758d57c5bd9133c08528 (patch)
treeac4d525171095ac34b08cab2713213bbd5ff250d /intern/cycles/device
parent6915555906ffa07f25187245c88501e169e5747e (diff)
Fix OptiX acceleration structure failing to build in viewport
The `optixAccelBuild` API throws an error when the property to get compacted size is passed in without the `OPTIX_BUILD_FLAG_ALLOW_COMPACTION` flag set. This is not currently hit because `background` is always true (set in `mem_alloc`), but would become an issue once that is sorted out, so fixing it now to be safe.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device_optix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/device/device_optix.cpp b/intern/cycles/device/device_optix.cpp
index 979ea7dba23..0a79bd1232b 100644
--- a/intern/cycles/device/device_optix.cpp
+++ b/intern/cycles/device/device_optix.cpp
@@ -1188,8 +1188,8 @@ class OptiXDevice : public Device {
out_data,
sizes.outputSizeInBytes,
&out_handle,
- &compacted_size_prop,
- 1));
+ background ? &compacted_size_prop : NULL,
+ background ? 1 : 0));
// Wait for all operations to finish
check_result_cuda_ret(cuStreamSynchronize(NULL));