[Bf-blender-cvs] [38185ad58d1] cycles-x: Fix Cycles X compaction fails with memory issues on Titan V

Sergey Sharybin noreply at git.blender.org
Thu Jun 24 11:08:36 CEST 2021


Commit: 38185ad58d1f66518ccb2c4e1b8d90340f198bf3
Author: Sergey Sharybin
Date:   Thu Jun 24 11:05:58 2021 +0200
Branches: cycles-x
https://developer.blender.org/rB38185ad58d1f66518ccb2c4e1b8d90340f198bf3

Fix Cycles X compaction fails with memory issues on Titan V

This card seems to report more threads available than half of the
maximum available states, which breaks offset logic in the path
compaction.

===================================================================

M	intern/cycles/integrator/path_trace_work_gpu.cpp

===================================================================

diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp
index 5228c3a12a1..7a546c9bb4d 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_gpu.cpp
@@ -50,6 +50,11 @@ PathTraceWorkGPU::PathTraceWorkGPU(Device *device,
       max_active_path_index_(0)
 {
   memset(&integrator_state_gpu_, 0, sizeof(integrator_state_gpu_));
+
+  /* Limit number of active paths to the half of the overall state. This is due to the logic in the
+   * path compaction which relies on the fact that regeneration does not happen sooner than half of
+   * the states are available again. */
+  min_num_active_paths_ = min(min_num_active_paths_, max_num_paths_ / 2);
 }
 
 void PathTraceWorkGPU::alloc_integrator_soa()



More information about the Bf-blender-cvs mailing list