diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2016-10-30 01:56:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-20 13:25:27 +0300 |
commit | e5a86361af7615aad39f5b06ede79f6ac929b53e (patch) | |
tree | 34d44ee312057788bd569e7126187f91999990a5 /intern/cycles/render/buffers.cpp | |
parent | feb48223466a0accb9a1220c820f9f4cdd76c130 (diff) |
Cycles: Initialize the RNG state from the kernel instead of the host
This allows to save a memory copy, which will be particularly useful for network rendering.
Reviewers: sergey, brecht, dingto, juicyfruit, maiself
Differential Revision: https://developer.blender.org/D2323
Diffstat (limited to 'intern/cycles/render/buffers.cpp')
-rw-r--r-- | intern/cycles/render/buffers.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp index 1e170d3a96e..cb20e811708 100644 --- a/intern/cycles/render/buffers.cpp +++ b/intern/cycles/render/buffers.cpp @@ -135,15 +135,7 @@ void RenderBuffers::reset(Device *device, BufferParams& params_) /* allocate rng state */ rng_state.resize(params.width, params.height); - uint *init_state = rng_state.resize(params.width, params.height); - int x, y, width = params.width, height = params.height; - - for(y = 0; y < height; y++) - for(x = 0; x < width; x++) - init_state[y*width + x] = hash_int_2d(params.full_x+x, params.full_y+y); - device->mem_alloc(rng_state, MEM_READ_WRITE); - device->mem_copy_to(rng_state); } bool RenderBuffers::copy_from_device() |