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:
authorAlaska <Alaska>2021-11-25 11:20:28 +0300
committerWilliam Leeson <william@blender.org>2021-11-25 11:32:26 +0300
commitb41c72b710d4013fd6d67dc49a8ebb2a416b4462 (patch)
tree9e8097c772e69325d072acceb13a67a8b9c38f7d /intern/cycles/integrator/work_tile_scheduler.cpp
parent8f2db94627d50df0d8c40b3b8f17db3e429bbb8d (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.cpp')
-rw-r--r--intern/cycles/integrator/work_tile_scheduler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/integrator/work_tile_scheduler.cpp b/intern/cycles/integrator/work_tile_scheduler.cpp
index 2d1ac07db7f..cac573dfeda 100644
--- a/intern/cycles/integrator/work_tile_scheduler.cpp
+++ b/intern/cycles/integrator/work_tile_scheduler.cpp
@@ -28,6 +28,11 @@ WorkTileScheduler::WorkTileScheduler()
{
}
+void WorkTileScheduler::set_accelerated_rt(bool accelerated_rt)
+{
+ accelerated_rt_ = accelerated_rt;
+}
+
void WorkTileScheduler::set_max_num_path_states(int max_num_path_states)
{
max_num_path_states_ = max_num_path_states;
@@ -59,7 +64,7 @@ void WorkTileScheduler::reset(const BufferParams &buffer_params,
void WorkTileScheduler::reset_scheduler_state()
{
tile_size_ = tile_calculate_best_size(
- image_size_px_, samples_num_, max_num_path_states_, scrambling_distance_);
+ accelerated_rt_, image_size_px_, samples_num_, max_num_path_states_, scrambling_distance_);
VLOG(3) << "Will schedule tiles of size " << tile_size_;