|
Blender V5.0
|
#include <session.h>
Classes | |
| struct | DelayedReset |
Public Member Functions | |
| Session (const SessionParams ¶ms, const SceneParams &scene_params) | |
| ~Session () | |
| void | start () |
| void | cancel (bool quick=false) |
| void | draw () |
| void | wait () |
| bool | ready_to_reset () |
| void | reset (const SessionParams &session_params, const BufferParams &buffer_params) |
| void | set_pause (bool pause) |
| void | set_samples (const int samples) |
| void | set_time_limit (const double time_limit) |
| void | set_output_driver (unique_ptr< OutputDriver > driver) |
| void | set_display_driver (unique_ptr< DisplayDriver > driver) |
| double | get_estimated_remaining_time () const |
| void | device_free () |
| float | get_progress () |
| void | collect_statistics (RenderStats *stats) |
| void | process_full_buffer_from_disk (string_view filename) |
Public Attributes | |
| unique_ptr< Device > | device |
| unique_ptr< Device > | denoise_device_ |
| unique_ptr< Scene > | scene |
| Progress | progress |
| SessionParams | params |
| Stats | stats |
| Profiler | profiler |
| std::function< void(string_view)> | full_buffer_written_cb |
Protected Types | |
| enum | { SESSION_THREAD_WAIT , SESSION_THREAD_RENDER , SESSION_THREAD_END } |
Protected Member Functions | |
| void | thread_run () |
| void | thread_render () |
| bool | is_session_thread_rendering () |
| RenderWork | run_update_for_next_iteration () |
| bool | run_wait_for_work (const RenderWork &render_work) |
| void | run_main_render_loop () |
| bool | update_scene (const bool reset_samples) |
| void | update_status_time (bool show_pause=false, bool show_done=false) |
| bool | delayed_reset_buffer_params () |
| void | update_buffers_for_params () |
| int2 | get_effective_tile_size () const |
| Device * | denoise_device () |
Definition at line 110 of file session/session.h.
|
protected |
| Enumerator | |
|---|---|
| SESSION_THREAD_WAIT | |
| SESSION_THREAD_RENDER | |
| SESSION_THREAD_END | |
Definition at line 226 of file session/session.h.
|
explicit |
Definition at line 30 of file session/session.cpp.
References Device::create(), delayed_reset_, denoise_device(), denoise_device_, device, full_buffer_written_cb, SessionParams::headless, TaskScheduler::init(), new_work_added_, params, path_trace_, pause_, profiler, progress, render_scheduler_, scene, session_thread_, stats, thread_run(), tile_manager_, and update_status_time().
| Session::~Session | ( | ) |
Definition at line 80 of file session/session.cpp.
References cancel(), denoise_device_, device, TaskScheduler::exit(), path_trace_, scene, session_thread_, session_thread_cond_, SESSION_THREAD_END, session_thread_mutex_, and session_thread_state_.
| void Session::cancel | ( | bool | quick = false | ) |
Definition at line 126 of file session/session.cpp.
References device, is_session_thread_rendering(), path_trace_, pause_, pause_cond_, pause_mutex_, progress, and wait().
Referenced by HdCyclesRenderPass::~HdCyclesRenderPass(), and ~Session().
| void Session::collect_statistics | ( | RenderStats * | stats | ) |
Definition at line 765 of file session/session.cpp.
References RenderStats::collect_profiling(), DEVICE_CPU, params, profiler, and scene.
|
protected |
Definition at line 497 of file session/session.cpp.
References buffer_params_, buffers_mutex_, delayed_reset_, get_effective_tile_size(), Integrator::MAX_SAMPLES, min, params, scene, and tile_manager_.
Referenced by run_update_for_next_iteration().
|
inlineprotected |
Definition at line 215 of file session/session.h.
References denoise_device_, and device.
Referenced by Session().
| void Session::device_free | ( | ) |
Definition at line 759 of file session/session.cpp.
References path_trace_, and scene.
| void Session::draw | ( | ) |
Definition at line 466 of file session/session.cpp.
References path_trace_.
|
protected |
Definition at line 471 of file session/session.cpp.
References buffer_params_, image_height, image_width, make_int2(), TileManager::MAX_TILE_SIZE, params, and tile_manager_.
Referenced by delayed_reset_buffer_params().
| double Session::get_estimated_remaining_time | ( | ) | const |
Definition at line 640 of file session/session.cpp.
References max, min, progress, render_scheduler_, tile_manager_, and total_time.
|
protected |
Definition at line 296 of file session/session.cpp.
References session_thread_mutex_, SESSION_THREAD_RENDER, and session_thread_state_.
Referenced by cancel(), and set_pause().
| void Session::process_full_buffer_from_disk | ( | string_view | filename | ) |
Definition at line 777 of file session/session.cpp.
References path_trace_.
| bool Session::ready_to_reset | ( | ) |
Definition at line 155 of file session/session.cpp.
References path_trace_.
| void Session::reset | ( | const SessionParams & | session_params, |
| const BufferParams & | buffer_params ) |
Definition at line 557 of file session/session.cpp.
References delayed_reset_, path_trace_, pause_cond_, pause_mutex_, and scene.
Referenced by update_scene().
|
protected |
Definition at line 160 of file session/session.cpp.
References buffers_mutex_, device, LOG_INFO, LOG_IS_ON, LOG_LEVEL_INFO, params, path_trace_, progress, render_scheduler_, run_update_for_next_iteration(), run_wait_for_work(), total_time, and update_status_time().
Referenced by thread_render().
|
protected |
Definition at line 302 of file session/session.cpp.
References buffer_params_, delayed_reset_, delayed_reset_buffer_params(), device, BufferParams::full_height, BufferParams::full_width, BufferParams::full_x, BufferParams::full_y, BufferParams::height, max, params, path_trace_, progress, render_scheduler_, RenderWork::resolution_divider, scene, tile, tile_manager_, update_buffers_for_params(), BufferParams::update_offset_stride(), update_scene(), GuidingParams::use, BufferParams::width, BufferParams::window_height, BufferParams::window_width, BufferParams::window_x, and BufferParams::window_y.
Referenced by run_main_render_loop().
|
protected |
Definition at line 424 of file session/session.cpp.
References delayed_reset_, new_work_added_, params, pause_, pause_cond_, pause_mutex_, progress, and update_status_time().
Referenced by run_main_render_loop().
| void Session::set_display_driver | ( | unique_ptr< DisplayDriver > | driver | ) |
Definition at line 635 of file session/session.cpp.
References path_trace_.
| void Session::set_output_driver | ( | unique_ptr< OutputDriver > | driver | ) |
Definition at line 630 of file session/session.cpp.
References path_trace_.
Referenced by HdCyclesRenderPass::HdCyclesRenderPass().
| void Session::set_pause | ( | bool | pause | ) |
Definition at line 607 of file session/session.cpp.
References is_session_thread_rendering(), pause_, pause_cond_, pause_mutex_, and update_status_time().
| void Session::set_samples | ( | const int | samples | ) |
Definition at line 575 of file session/session.cpp.
References new_work_added_, params, pause_cond_, and pause_mutex_.
Referenced by HdCyclesDelegate::SetRenderSetting().
| void Session::set_time_limit | ( | const double | time_limit | ) |
Definition at line 591 of file session/session.cpp.
References new_work_added_, params, pause_cond_, and pause_mutex_.
Referenced by HdCyclesDelegate::SetRenderSetting().
| void Session::start | ( | ) |
Definition at line 111 of file session/session.cpp.
References session_thread_cond_, session_thread_mutex_, SESSION_THREAD_RENDER, and session_thread_state_.
|
protected |
Definition at line 268 of file session/session.cpp.
References DEVICE_CPU, params, profiler, progress, and run_main_render_loop().
Referenced by thread_run().
|
protected |
Definition at line 231 of file session/session.cpp.
References path_trace_, session_thread_cond_, SESSION_THREAD_END, session_thread_mutex_, SESSION_THREAD_RENDER, session_thread_state_, SESSION_THREAD_WAIT, and thread_render().
Referenced by Session().
|
protected |
Definition at line 526 of file session/session.cpp.
References buffer_params_, params, progress, render_scheduler_, scene, and tile_manager_.
Referenced by run_update_for_next_iteration().
|
protected |
Definition at line 673 of file session/session.cpp.
References params, profiler, progress, reset(), scene, and tile_manager_.
Referenced by run_update_for_next_iteration().
Definition at line 710 of file session/session.cpp.
References device, Integrator::MAX_SAMPLES, num_tiles, params, progress, render_scheduler_, status, status_append(), string_printf(), and tile_manager_.
Referenced by run_main_render_loop(), run_wait_for_work(), Session(), and set_pause().
| void Session::wait | ( | ) |
Definition at line 661 of file session/session.cpp.
References session_thread_cond_, session_thread_mutex_, SESSION_THREAD_RENDER, and session_thread_state_.
Referenced by cancel().
|
protected |
Definition at line 241 of file session/session.h.
Referenced by delayed_reset_buffer_params(), get_effective_tile_size(), run_update_for_next_iteration(), and update_buffers_for_params().
|
protected |
Definition at line 238 of file session/session.h.
Referenced by delayed_reset_buffer_params(), and run_main_render_loop().
|
protected |
Referenced by delayed_reset_buffer_params(), reset(), run_update_for_next_iteration(), run_wait_for_work(), and Session().
| unique_ptr<Device> Session::denoise_device_ |
Definition at line 114 of file session/session.h.
Referenced by denoise_device(), Session(), and ~Session().
| unique_ptr<Device> Session::device |
Definition at line 112 of file session/session.h.
Referenced by cancel(), denoise_device(), run_main_render_loop(), run_update_for_next_iteration(), Session(), update_status_time(), and ~Session().
| std::function<void(string_view)> Session::full_buffer_written_cb |
Definition at line 124 of file session/session.h.
Referenced by Session().
|
protected |
Definition at line 233 of file session/session.h.
Referenced by run_wait_for_work(), Session(), set_samples(), and set_time_limit().
| SessionParams Session::params |
Definition at line 117 of file session/session.h.
Referenced by collect_statistics(), delayed_reset_buffer_params(), get_effective_tile_size(), HdCyclesDelegate::GetRenderSetting(), run_main_render_loop(), run_update_for_next_iteration(), run_wait_for_work(), Session(), set_samples(), set_time_limit(), HdCyclesDelegate::SetRenderSetting(), thread_render(), update_buffers_for_params(), update_scene(), and update_status_time().
|
protected |
Definition at line 250 of file session/session.h.
Referenced by cancel(), device_free(), draw(), process_full_buffer_from_disk(), ready_to_reset(), reset(), run_main_render_loop(), run_update_for_next_iteration(), Session(), set_display_driver(), set_output_driver(), thread_run(), and ~Session().
|
protected |
Definition at line 232 of file session/session.h.
Referenced by cancel(), run_wait_for_work(), Session(), and set_pause().
|
protected |
Definition at line 235 of file session/session.h.
Referenced by cancel(), reset(), run_wait_for_work(), set_pause(), set_samples(), and set_time_limit().
|
protected |
Definition at line 236 of file session/session.h.
Referenced by cancel(), reset(), run_wait_for_work(), set_pause(), set_samples(), and set_time_limit().
| Profiler Session::profiler |
Definition at line 119 of file session/session.h.
Referenced by collect_statistics(), Session(), thread_render(), and update_scene().
| Progress Session::progress |
Definition at line 116 of file session/session.h.
Referenced by cancel(), get_estimated_remaining_time(), HdCyclesRenderPass::HdCyclesRenderPass(), run_main_render_loop(), run_update_for_next_iteration(), run_wait_for_work(), Session(), thread_render(), update_buffers_for_params(), update_scene(), and update_status_time().
|
protected |
Definition at line 244 of file session/session.h.
Referenced by get_estimated_remaining_time(), run_main_render_loop(), run_update_for_next_iteration(), Session(), update_buffers_for_params(), and update_status_time().
| unique_ptr<Scene> Session::scene |
Definition at line 115 of file session/session.h.
Referenced by collect_statistics(), delayed_reset_buffer_params(), device_free(), HdCyclesFileReader::read(), reset(), run_update_for_next_iteration(), Session(), update_buffers_for_params(), update_scene(), and ~Session().
|
protected |
Definition at line 223 of file session/session.h.
Referenced by Session(), and ~Session().
|
protected |
Definition at line 224 of file session/session.h.
Referenced by start(), thread_run(), wait(), and ~Session().
|
protected |
Definition at line 225 of file session/session.h.
Referenced by is_session_thread_rendering(), start(), thread_run(), wait(), and ~Session().
| enum { ... } Session::session_thread_state_ |
Referenced by is_session_thread_rendering(), start(), thread_run(), wait(), and ~Session().
| Stats Session::stats |
Definition at line 118 of file session/session.h.
Referenced by get_progress(), and Session().
|
protected |
Definition at line 240 of file session/session.h.
Referenced by delayed_reset_buffer_params(), get_effective_tile_size(), get_estimated_remaining_time(), run_update_for_next_iteration(), Session(), update_buffers_for_params(), update_scene(), and update_status_time().
|
protected |
Definition at line 237 of file session/session.h.