diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-19 16:15:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-19 16:18:04 +0300 |
commit | 0f652501c7b5d0c5d73bf22b9aa56f6a5a645a4b (patch) | |
tree | 82477d52de25da60b53631f03bd5dd5738e7f42a /intern | |
parent | 27d1446d24cc9d4146a94c2ece8146838af5cdca (diff) |
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.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/light.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp index ca6853ecb6e..284012ecd63 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); |