Commit: 0f652501c7b5d0c5d73bf22b9aa56f6a5a645a4b
Author: Sergey Sharybin
Date:   Thu Feb 19 18:15:07 2015 +0500
Branches: master
https://developer.blender.org/rB0f652501c7b5d0c5d73bf22b9aa56f6a5a645a4b

Cycles: Reduce memory used by background light update

Simple change: just get rid of intermediate data a bit earlier, before
final pixels array is being allocated. This gives around 30% of memory
save during light update (this is about 60meg in the frank sheep file
i'm using here).

This isn't really visible by artists a lot, because actual spike happens
on BVH construction. But it doesn't mean we shouldn't be accurate with
memory usage in other areas.

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

M       intern/cycles/render/light.cpp

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

diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index ca6853e..284012e 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -82,6 +82,8 @@ static void shade_background_pixels(Device *device, 
DeviceScene *dscene, int res
        device->mem_free(d_input);
        device->mem_free(d_output);
 
+       d_input.clear();
+
        float4 *d_output_data = 
reinterpret_cast<float4*>(d_output.data_pointer);
 
        pixels.resize(width*height);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to