diff options
Diffstat (limited to 'intern/cycles/integrator/path_trace.cpp')
-rw-r--r-- | intern/cycles/integrator/path_trace.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp index bdc18b1c0a1..0b55d1078a8 100644 --- a/intern/cycles/integrator/path_trace.cpp +++ b/intern/cycles/integrator/path_trace.cpp @@ -115,7 +115,9 @@ bool PathTrace::ready_to_reset() return false; } -void PathTrace::reset(const BufferParams &full_params, const BufferParams &big_tile_params) +void PathTrace::reset(const BufferParams &full_params, + const BufferParams &big_tile_params, + const bool reset_rendering) { if (big_tile_params_.modified(big_tile_params)) { big_tile_params_ = big_tile_params; @@ -128,7 +130,7 @@ void PathTrace::reset(const BufferParams &full_params, const BufferParams &big_t * It is requires to inform about reset whenever it happens, so that the redraw state tracking is * properly updated. */ if (display_) { - display_->reset(full_params); + display_->reset(big_tile_params, reset_rendering); } render_state_.has_denoised_result = false; @@ -594,6 +596,15 @@ void PathTrace::draw() did_draw_after_reset_ |= display_->draw(); } +void PathTrace::flush_display() +{ + if (!display_) { + return; + } + + display_->flush(); +} + void PathTrace::update_display(const RenderWork &render_work) { if (!render_work.display.update) { @@ -622,9 +633,8 @@ void PathTrace::update_display(const RenderWork &render_work) if (display_) { VLOG(3) << "Perform copy to GPUDisplay work."; - const int resolution_divider = render_work.resolution_divider; - const int texture_width = max(1, full_params_.width / resolution_divider); - const int texture_height = max(1, full_params_.height / resolution_divider); + const int texture_width = render_state_.effective_big_tile_params.window_width; + const int texture_height = render_state_.effective_big_tile_params.window_height; if (!display_->update_begin(texture_width, texture_height)) { LOG(ERROR) << "Error beginning GPUDisplay update."; return; |