Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/session/session.cpp
| Show First 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | if (render_work) { | ||||
| const int resolution = render_work.resolution_divider; | const int resolution = render_work.resolution_divider; | ||||
| const int width = max(1, buffer_params_.full_width / resolution); | const int width = max(1, buffer_params_.full_width / resolution); | ||||
| const int height = max(1, buffer_params_.full_height / resolution); | const int height = max(1, buffer_params_.full_height / resolution); | ||||
| if (update_scene(width, height)) { | if (update_scene(width, height)) { | ||||
| profiler.reset(scene->shaders.size(), scene->objects.size()); | profiler.reset(scene->shaders.size(), scene->objects.size()); | ||||
| } | } | ||||
| /* Unlock scene mutex before loading denoiser kernels, since that may attempt to activate | |||||
| * graphics interop, which can deadlock when the scene mutex is still being held. */ | |||||
| scene_lock.unlock(); | |||||
| path_trace_->load_kernels(); | |||||
| path_trace_->alloc_work_memory(); | |||||
| progress.add_skip_time(update_timer, params.background); | progress.add_skip_time(update_timer, params.background); | ||||
| } | } | ||||
| return render_work; | return render_work; | ||||
| } | } | ||||
| bool Session::run_wait_for_work(const RenderWork &render_work) | bool Session::run_wait_for_work(const RenderWork &render_work) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | |||||
| bool Session::update_scene(int width, int height) | bool Session::update_scene(int width, int height) | ||||
| { | { | ||||
| /* Update camera if dimensions changed for progressive render. the camera | /* Update camera if dimensions changed for progressive render. the camera | ||||
| * knows nothing about progressive or cropped rendering, it just gets the | * knows nothing about progressive or cropped rendering, it just gets the | ||||
| * image dimensions passed in. */ | * image dimensions passed in. */ | ||||
| Camera *cam = scene->camera; | Camera *cam = scene->camera; | ||||
| cam->set_screen_size(width, height); | cam->set_screen_size(width, height); | ||||
| const bool scene_update_result = scene->update(progress); | return scene->update(progress); | ||||
| path_trace_->load_kernels(); | |||||
| path_trace_->alloc_work_memory(); | |||||
| return scene_update_result; | |||||
| } | } | ||||
| static string status_append(const string &status, const string &suffix) | static string status_append(const string &status, const string &suffix) | ||||
| { | { | ||||
| string prefix = status; | string prefix = status; | ||||
| if (!prefix.empty()) { | if (!prefix.empty()) { | ||||
| prefix += ", "; | prefix += ", "; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||