diff options
-rw-r--r-- | intern/cycles/device/device_task.cpp | 11 | ||||
-rw-r--r-- | intern/cycles/render/scene.cpp | 36 |
2 files changed, 28 insertions, 19 deletions
diff --git a/intern/cycles/device/device_task.cpp b/intern/cycles/device/device_task.cpp index 2cc9c6a985f..55fbaa31e42 100644 --- a/intern/cycles/device/device_task.cpp +++ b/intern/cycles/device/device_task.cpp @@ -45,7 +45,16 @@ DeviceTask::DeviceTask(Type type_) shader_filter(0), shader_x(0), shader_w(0), - buffers(nullptr) + buffers(nullptr), + tile_types(0), + denoising_from_render(false), + pass_stride(0), + frame_stride(0), + target_pass_stride(0), + pass_denoising_data(0), + pass_denoising_clean(0), + need_finish_queue(false), + integrator_branched(false) { last_update_time = time_dt(); } diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index 6bb25677965..d3dfe1c5be6 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -91,6 +91,7 @@ DeviceScene::DeviceScene(Device *device) Scene::Scene(const SceneParams ¶ms_, Device *device) : name("Scene"), + bvh(NULL), default_surface(NULL), default_volume(NULL), default_light(NULL), @@ -99,37 +100,36 @@ Scene::Scene(const SceneParams ¶ms_, Device *device) device(device), dscene(device), params(params_), - update_stats(NULL) + update_stats(NULL), + kernels_loaded(false), + /* TODO(sergey): Check if it's indeed optimal value for the split kernel. */ + max_closure_global(1) { memset((void *)&dscene.data, 0, sizeof(dscene.data)); - bvh = NULL; - camera = create_node<Camera>(); - dicing_camera = create_node<Camera>(); - lookup_tables = new LookupTables(); - film = create_node<Film>(); - background = create_node<Background>(); + /* OSL only works on the CPU */ + if (device->info.has_osl) + shader_manager = ShaderManager::create(params.shadingsystem); + else + shader_manager = ShaderManager::create(SHADINGSYSTEM_SVM); + light_manager = new LightManager(); geometry_manager = new GeometryManager(); object_manager = new ObjectManager(); - integrator = create_node<Integrator>(); image_manager = new ImageManager(device->info); particle_system_manager = new ParticleSystemManager(); bake_manager = new BakeManager(); procedural_manager = new ProceduralManager(); - kernels_loaded = false; - /* TODO(sergey): Check if it's indeed optimal value for the split kernel. */ - max_closure_global = 1; + /* Create nodes after managers, since create_node() can tag the managers. */ + camera = create_node<Camera>(); + dicing_camera = create_node<Camera>(); + lookup_tables = new LookupTables(); + film = create_node<Film>(); + background = create_node<Background>(); + integrator = create_node<Integrator>(); film->add_default(this); - - /* OSL only works on the CPU */ - if (device->info.has_osl) - shader_manager = ShaderManager::create(params.shadingsystem); - else - shader_manager = ShaderManager::create(SHADINGSYSTEM_SVM); - shader_manager->add_default(this); } |