diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-09-27 01:39:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-04 22:11:14 +0300 |
commit | e3e16cecc4f080edbbd14e4bf1cfc580c5957d62 (patch) | |
tree | 5b9da903526442acb10b48d2ccee5686a00a1017 /intern/cycles/render/buffers.cpp | |
parent | 5b7d6ea54b2fc35b8b12c667f5bf9a1c9c46d5c2 (diff) |
Code refactor: remove rng_state buffer and compute hash on the fly.
A little faster on some benchmark scenes, a little slower on others, seems
about performance neutral on average and saves a little memory.
Diffstat (limited to 'intern/cycles/render/buffers.cpp')
-rw-r--r-- | intern/cycles/render/buffers.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index cf402c3f214..cf66e5385c9 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -108,7 +108,6 @@ RenderTile::RenderTile() stride = 0; buffer = 0; - rng_state = 0; buffers = NULL; } @@ -131,11 +130,6 @@ void RenderBuffers::device_free() device->mem_free(buffer); buffer.clear(); } - - if(rng_state.device_pointer) { - device->mem_free(rng_state); - rng_state.clear(); - } } void RenderBuffers::reset(Device *device, BufferParams& params_) @@ -149,11 +143,6 @@ void RenderBuffers::reset(Device *device, BufferParams& params_) buffer.resize(params.width*params.height*params.get_passes_size()); device->mem_alloc("render_buffer", buffer, MEM_READ_WRITE); device->mem_zero(buffer); - - /* allocate rng state */ - rng_state.resize(params.width, params.height); - - device->mem_alloc("rng_state", rng_state, MEM_READ_WRITE); } bool RenderBuffers::copy_from_device(Device *from_device) |