Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2016-05-08 02:22:28 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2016-05-08 02:22:28 +0300
commit1955754934425de7a6c51fe71bf79e965035d28f (patch)
treeea688017822ed30de4834d33df4bac617e4a8704 /intern
parente5b4e6b0a3e8d40dc31dec74cfa2c297b3c49a71 (diff)
Cycles: Cleanup: Swap order of the RNG-state-initializing for-loops
Swap the for-loops in the RenderBuffer reset code to follow the convention of looping over y in the outer loop. The improved cache performance won't really be noticable here, but it's nicer if it follows the usual style.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/buffers.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/render/buffers.cpp b/intern/cycles/render/buffers.cpp
index fab3f701757..0d62c1b72de 100644
--- a/intern/cycles/render/buffers.cpp
+++ b/intern/cycles/render/buffers.cpp
@@ -138,9 +138,9 @@ void RenderBuffers::reset(Device *device, BufferParams& params_)
uint *init_state = rng_state.resize(params.width, params.height);
int x, y, width = params.width, height = params.height;
- for(x = 0; x < width; x++)
- for(y = 0; y < height; y++)
- init_state[x + y*width] = hash_int_2d(params.full_x+x, params.full_y+y);
+ 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);