diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-14 20:48:43 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-14 20:48:43 +0400 |
commit | e0ca72735d586ba0abc380018bdc247199479f15 (patch) | |
tree | e893600dc556632f050f3585f7df599cbf962320 | |
parent | adbd84c320d8b0781e97d09055f6cde4920b79f8 (diff) |
Further fix for #34121: OSL + persistent images could crash in some cases still.
-rw-r--r-- | intern/cycles/blender/blender_session.cpp | 3 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/render/scene.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/render/scene.h | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp index dfea9833287..98a4e5bda9f 100644 --- a/intern/cycles/blender/blender_session.cpp +++ b/intern/cycles/blender/blender_session.cpp @@ -128,7 +128,8 @@ void BlenderSession::reset_session(BL::BlendData b_data_, BL::Scene b_scene_) height = b_engine.resolution_y(); if(scene->params.modified(scene_params) || - session->params.modified(session_params)) + session->params.modified(session_params) || + !scene_params.persistent_data) { /* if scene or session parameters changed, it's easier to simply re-create * them rather than trying to distinguish which settings need to be updated diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 87c4efffe6c..f6ff78ab2ac 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -308,9 +308,9 @@ SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background) params.use_bvh_cache = (background)? RNA_boolean_get(&cscene, "use_cache"): false; if(background && params.shadingsystem != SceneParams::OSL) - params.persistent_images = r.use_persistent_data(); + params.persistent_data = r.use_persistent_data(); else - params.persistent_images = false; + params.persistent_data = false; return params; } diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index a1fcffa94a4..7b82a91cae8 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -106,7 +106,7 @@ void Scene::free_memory(bool final) particle_system_manager->device_free(device, &dscene); curve_system_manager->device_free(device, &dscene); - if(!params.persistent_images || final) + if(!params.persistent_data || final) image_manager->device_free(device, &dscene); } diff --git a/intern/cycles/render/scene.h b/intern/cycles/render/scene.h index f6e1daea80d..fc6b538af03 100644 --- a/intern/cycles/render/scene.h +++ b/intern/cycles/render/scene.h @@ -125,7 +125,7 @@ public: bool use_bvh_cache; bool use_bvh_spatial_split; bool use_qbvh; - bool persistent_images; + bool persistent_data; SceneParams() { @@ -146,7 +146,7 @@ public: && use_bvh_cache == params.use_bvh_cache && use_bvh_spatial_split == params.use_bvh_spatial_split && use_qbvh == params.use_qbvh - && persistent_images == params.persistent_images); } + && persistent_data == params.persistent_data); } }; /* Scene */ |