diff options
author | Alaska <Alaska> | 2021-11-25 11:20:28 +0300 |
---|---|---|
committer | William Leeson <william@blender.org> | 2021-11-25 11:32:26 +0300 |
commit | b41c72b710d4013fd6d67dc49a8ebb2a416b4462 (patch) | |
tree | 9e8097c772e69325d072acceb13a67a8b9c38f7d /intern/cycles/integrator/work_tile_scheduler.h | |
parent | 8f2db94627d50df0d8c40b3b8f17db3e429bbb8d (diff) |
Fix performance decrease with Scrambling Distance on
With the current code in master, scrambling distance is enabled on non-hardware accelerated ray tracing devices see a measurable performance decrease when compared scrambling distance on vs off. From testing, this performance decrease comes from the large tile sizes scheduled in `tile.cpp`.
This patch attempts to address the performance decrease by using different algorithms to calculate the tile size for devices with hardware accelerated ray traversal and devices without. Large tile sizes for hardware accelerated devices and small tile sizes for others.
Most of this code is based on proposals from @brecht and @leesonw
Reviewed By: brecht, leesonw
Differential Revision: https://developer.blender.org/D13042
Diffstat (limited to 'intern/cycles/integrator/work_tile_scheduler.h')
-rw-r--r-- | intern/cycles/integrator/work_tile_scheduler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/integrator/work_tile_scheduler.h b/intern/cycles/integrator/work_tile_scheduler.h index d9fa7e84431..8aa2f8e90bd 100644 --- a/intern/cycles/integrator/work_tile_scheduler.h +++ b/intern/cycles/integrator/work_tile_scheduler.h @@ -31,6 +31,9 @@ class WorkTileScheduler { public: WorkTileScheduler(); + /* To indicate if there is accelerated RT support. */ + void set_accelerated_rt(bool state); + /* MAximum path states which are allowed to be used by a single scheduled work tile. * * Affects the scheduled work size: the work size will be as big as possible, but will not exceed @@ -54,6 +57,9 @@ class WorkTileScheduler { protected: void reset_scheduler_state(); + /* Used to indicate if there is accelerated ray tracing. */ + bool accelerated_rt_ = false; + /* Maximum allowed path states to be used. * * TODO(sergey): Naming can be improved. The fact that this is a limiting factor based on the |