From abb3a86e10fee210cdb47ceb15e1ad9cf1790209 Mon Sep 17 00:00:00 2001 From: Mai Lavelle Date: Thu, 18 Jan 2018 22:40:48 -0500 Subject: [PATCH] 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...) --- intern/cycles/render/scene.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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);