Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/render_scheduler.h
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | struct { | ||||
| bool reset = false; | bool reset = false; | ||||
| } adaptive_sampling; | } adaptive_sampling; | ||||
| bool denoise = false; | bool denoise = false; | ||||
| /* Display which is used to visualize render result is to be updated for the new render. */ | /* Display which is used to visualize render result is to be updated for the new render. */ | ||||
| bool update_display = false; | bool update_display = false; | ||||
| /* Re-balance multi-device scheduling after rendering this work. | |||||
| * Note that the scheduler does not know anything abouce devices, so if there is only a single | |||||
| * device used, then it is up for the PathTracer to ignore the balancing. */ | |||||
| bool rebalance = false; | |||||
| /* Conversion to bool, to simplify checks about whether there is anything to be done for this | /* Conversion to bool, to simplify checks about whether there is anything to be done for this | ||||
| * work. */ | * work. */ | ||||
| inline operator bool() const | inline operator bool() const | ||||
| { | { | ||||
| return path_trace.num_samples || adaptive_sampling.filter || denoise || update_display; | return path_trace.num_samples || adaptive_sampling.filter || denoise || update_display; | ||||
| } | } | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | protected: | ||||
| * later sample, to reduce overhead. */ | * later sample, to reduce overhead. */ | ||||
| bool work_need_denoise(bool &delayed); | bool work_need_denoise(bool &delayed); | ||||
| /* Check whether current work need to update display. | /* Check whether current work need to update display. | ||||
| * | * | ||||
| * The `denoiser_delayed` is what `work_need_denoise()` returned as delayed denoiser flag. */ | * The `denoiser_delayed` is what `work_need_denoise()` returned as delayed denoiser flag. */ | ||||
| bool work_need_update_display(const bool denoiser_delayed); | bool work_need_update_display(const bool denoiser_delayed); | ||||
| /* Check whether it is time to perform rebalancing for the render work, */ | |||||
| bool work_need_rebalance(); | |||||
| /* Check whether timing of the given work are usable to store timings in the `first_render_time_` | /* Check whether timing of the given work are usable to store timings in the `first_render_time_` | ||||
| * for the resolution divider calculation. */ | * for the resolution divider calculation. */ | ||||
| bool work_is_usable_for_first_render_estimation(const RenderWork &render_work); | bool work_is_usable_for_first_render_estimation(const RenderWork &render_work); | ||||
| void set_start_render_time_if_needed(); | void set_start_render_time_if_needed(); | ||||
| /* CHeck whether render time limit has been reached (or exceeded), and if so store related | /* CHeck whether render time limit has been reached (or exceeded), and if so store related | ||||
| * information in the state so that rendering is considered finished, and is possible to report | * information in the state so that rendering is considered finished, and is possible to report | ||||
| ▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | struct { | ||||
| /* Number of rendered samples on top of the start sample. */ | /* Number of rendered samples on top of the start sample. */ | ||||
| int num_rendered_samples = 0; | int num_rendered_samples = 0; | ||||
| /* Point in time the latest GPUDisplay work has been scheduled. */ | /* Point in time the latest GPUDisplay work has been scheduled. */ | ||||
| double last_display_update_time = 0.0; | double last_display_update_time = 0.0; | ||||
| /* Value of -1 means display was never updated. */ | /* Value of -1 means display was never updated. */ | ||||
| int last_display_update_sample = -1; | int last_display_update_sample = -1; | ||||
| /* Point in time at which last rebalance has been performed. */ | |||||
| double last_rebalance_time = 0.0; | |||||
| /* Threshold for adaptive sampling which will be scheduled to work when not using progressive | /* Threshold for adaptive sampling which will be scheduled to work when not using progressive | ||||
| * noise floor. */ | * noise floor. */ | ||||
| float adaptive_sampling_threshold = 0.0f; | float adaptive_sampling_threshold = 0.0f; | ||||
| bool path_trace_finished = false; | bool path_trace_finished = false; | ||||
| bool time_limit_reached = false; | bool time_limit_reached = false; | ||||
| /* Time at which rendering started and finished. */ | /* Time at which rendering started and finished. */ | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||