Cycles: Update remaining time once per second without waiting for a tile change
Previously, the code would only update the status string if the main status changed. However, the main status did not include the remaining time, and therefore it wasn't updated until the amount of rendered tiles (which is part of the main status) changed. This commit therefore makes the BlenderSession remember the time of the last status update and forces a status update if the last one was more than a second ago. Reviewers: sergey Differential Revision: https://developer.blender.org/D2465
This commit is contained in:
@@ -833,7 +833,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
|
||||
int progressive_sample = tile_manager.state.sample;
|
||||
int num_samples = tile_manager.get_num_effective_samples();
|
||||
|
||||
int tile = tile_manager.state.num_rendered_tiles;
|
||||
int tile = progress.get_finished_tiles();
|
||||
int num_tiles = tile_manager.state.num_tiles;
|
||||
|
||||
/* update status */
|
||||
@@ -841,7 +841,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
|
||||
|
||||
if(!params.progressive) {
|
||||
const bool is_cpu = params.device.type == DEVICE_CPU;
|
||||
const bool is_last_tile = (progress.get_finished_tiles() + 1) == num_tiles;
|
||||
const bool is_last_tile = (tile + 1) == num_tiles;
|
||||
|
||||
substatus = string_printf("Path Tracing Tile %d/%d", tile, num_tiles);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user