Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/scene.cpp
| Show All 28 Lines | |||||
| #include "osl.h" | #include "osl.h" | ||||
| #include "particles.h" | #include "particles.h" | ||||
| #include "scene.h" | #include "scene.h" | ||||
| #include "shader.h" | #include "shader.h" | ||||
| #include "svm.h" | #include "svm.h" | ||||
| #include "tables.h" | #include "tables.h" | ||||
| #include "util_foreach.h" | #include "util_foreach.h" | ||||
| #include "util_progress.h" | |||||
| #ifdef WITH_CYCLES_DEBUG | |||||
| # include "util_guarded_allocator.h" | #include "util_guarded_allocator.h" | ||||
| # include "util_logging.h" | #include "util_logging.h" | ||||
| #endif | #include "util_progress.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| Scene::Scene(const SceneParams& params_, const DeviceInfo& device_info_) | Scene::Scene(const SceneParams& params_, const DeviceInfo& device_info_) | ||||
| : params(params_) | : params(params_) | ||||
| { | { | ||||
| device = NULL; | device = NULL; | ||||
| memset(&dscene.data, 0, sizeof(dscene.data)); | memset(&dscene.data, 0, sizeof(dscene.data)); | ||||
| ▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | void Scene::device_update(Device *device_, Progress& progress) | ||||
| if(progress.get_cancel() || device->have_error()) return; | if(progress.get_cancel() || device->have_error()) return; | ||||
| if(device->have_error() == false) { | if(device->have_error() == false) { | ||||
| progress.set_status("Updating Device", "Writing constant memory"); | progress.set_status("Updating Device", "Writing constant memory"); | ||||
| device->const_copy_to("__data", &dscene.data, sizeof(dscene.data)); | device->const_copy_to("__data", &dscene.data, sizeof(dscene.data)); | ||||
| } | } | ||||
| #ifdef WITH_CYCLES_DEBUG | |||||
| VLOG(1) << "System memory statistics after full device sync:\n" | VLOG(1) << "System memory statistics after full device sync:\n" | ||||
| << " Usage: " << util_guarded_get_mem_used() << "\n" | << " Usage: " << util_guarded_get_mem_used() << "\n" | ||||
| << " Peak: " << util_guarded_get_mem_peak(); | << " Peak: " << util_guarded_get_mem_peak(); | ||||
| #endif | |||||
| } | } | ||||
| Scene::MotionType Scene::need_motion(bool advanced_shading) | Scene::MotionType Scene::need_motion(bool advanced_shading) | ||||
| { | { | ||||
| if(integrator->motion_blur) | if(integrator->motion_blur) | ||||
| return (advanced_shading)? MOTION_BLUR: MOTION_NONE; | return (advanced_shading)? MOTION_BLUR: MOTION_NONE; | ||||
| else if(Pass::contains(film->passes, PASS_MOTION)) | else if(Pass::contains(film->passes, PASS_MOTION)) | ||||
| return MOTION_PASS; | return MOTION_PASS; | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||