diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-03-15 20:52:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-03-15 22:46:57 +0300 |
commit | 8f93386e6296dc7a190b61cb473b1eaec76b9111 (patch) | |
tree | 61fb5fd5dd8cd9c5a25141c1c6c28c515e8d0d32 /intern/cycles/render | |
parent | 21bc1a99baa765d81c3203fd2e451681b8a7fd55 (diff) |
Fix (apparently harmless) Cycles asan warnings
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/scene.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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); } |