[Bf-blender-cvs] [6d8aa850511] master: Fix too much memory usage for Cycles attribute map.

Brecht Van Lommel noreply at git.blender.org
Mon May 21 12:07:41 CEST 2018


Commit: 6d8aa8505115c03ab2a50489f23fe36dea8cd564
Author: Brecht Van Lommel
Date:   Mon May 21 11:08:03 2018 +0200
Branches: master
https://developer.blender.org/rB6d8aa8505115c03ab2a50489f23fe36dea8cd564

Fix too much memory usage for Cycles attribute map.

Thanks to Thomas Krebs for identifying the problem and solution.

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

M	intern/cycles/render/mesh.cpp

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

diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index 7cfbb7b7c7d..7a9d604244d 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -1307,7 +1307,7 @@ void MeshManager::update_svm_attributes(Device *, DeviceScene *dscene, Scene *sc
 		return;
 
 	/* create attribute map */
-	uint4 *attr_map = dscene->attributes_map.alloc(attr_map_size*scene->meshes.size());
+	uint4 *attr_map = dscene->attributes_map.alloc(attr_map_size);
 	memset(attr_map, 0, dscene->attributes_map.size()*sizeof(uint));
 
 	for(size_t i = 0; i < scene->meshes.size(); i++) {



More information about the Bf-blender-cvs mailing list