[Bf-blender-cvs] [abb3a86e10f] master: Fix T53833: Particle Info node and Displacement Crash

Mai Lavelle noreply at git.blender.org
Fri Jan 19 04:43:26 CET 2018


Commit: abb3a86e10fee210cdb47ceb15e1ad9cf1790209
Author: Mai Lavelle
Date:   Thu Jan 18 22:40:48 2018 -0500
Branches: master
https://developer.blender.org/rBabb3a86e10fee210cdb47ceb15e1ad9cf1790209

Fix T53833: Particle Info node and Displacement Crash

The displacement shared was running before particle data was copied to the
device causing bad memory access when the particle info node was used. Fix
is simply to move particle update before mesh update so the data is
available to displacement shaders.

(Altho this fixes the crash the particle info node is still mostly useless
with displacement for now...)

===================================================================

M	intern/cycles/render/scene.cpp

===================================================================

diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp
index 09a69265de8..e34601a36a9 100644
--- a/intern/cycles/render/scene.cpp
+++ b/intern/cycles/render/scene.cpp
@@ -214,6 +214,11 @@ void Scene::device_update(Device *device_, Progress& progress)
 
 	if(progress.get_cancel() || device->have_error()) return;
 
+	progress.set_status("Updating Particle Systems");
+	particle_system_manager->device_update(device, &dscene, this, progress);
+
+	if(progress.get_cancel() || device->have_error()) return;
+
 	progress.set_status("Updating Meshes");
 	mesh_manager->device_update(device, &dscene, this, progress);
 
@@ -249,11 +254,6 @@ void Scene::device_update(Device *device_, Progress& progress)
 
 	if(progress.get_cancel() || device->have_error()) return;
 
-	progress.set_status("Updating Particle Systems");
-	particle_system_manager->device_update(device, &dscene, this, progress);
-
-	if(progress.get_cancel() || device->have_error()) return;
-
 	progress.set_status("Updating Integrator");
 	integrator->device_update(device, &dscene, this);



More information about the Bf-blender-cvs mailing list