[Bf-blender-cvs] [89578a8f6ed] master: Fix OptiX acceleration structure failing to build in viewport
Patrick Mours
noreply at git.blender.org
Fri Jan 10 16:03:21 CET 2020
Commit: 89578a8f6eddd72f3e81758d57c5bd9133c08528
Author: Patrick Mours
Date: Fri Jan 10 16:03:11 2020 +0100
Branches: master
https://developer.blender.org/rB89578a8f6eddd72f3e81758d57c5bd9133c08528
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.
===================================================================
M intern/cycles/device/device_optix.cpp
===================================================================
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));
More information about the Bf-blender-cvs
mailing list