diff options
author | Ton Roosendaal <ton@blender.org> | 2006-11-29 20:01:09 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-11-29 20:01:09 +0300 |
commit | 6543d3e220a8e481eebe73f67dccaf9e752cef22 (patch) | |
tree | 8596ec3249e102cf2a73d23216d06cfd46a70b46 /source/blender/blenlib/intern/rand.c | |
parent | 35f3682f7c1a1f336144a643b1a2c0fec5dfe105 (diff) |
Render Monster support: (part 1)
Removed all limitations from render code for maximum threads. The only
define for this now is in BLI_threads.h, and currently set to 8.
Note that each thread renders an entire tile, and also allocates the
buffers for the tiles, so; more threads might work better with smaller
tiles.
IMPORTANT: node system won't work yet with more than 2 threads! So, don't
try material nodes or compositing with over 2 threads. That I'll commit
later today.
What does work (should work :) is AO and soft shadow now.
Diffstat (limited to 'source/blender/blenlib/intern/rand.c')
-rw-r--r-- | source/blender/blenlib/intern/rand.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c index bf700f8c62c..df01288aab8 100644 --- a/source/blender/blenlib/intern/rand.c +++ b/source/blender/blenlib/intern/rand.c @@ -36,6 +36,8 @@ #include "MEM_guardedalloc.h" #include "PIL_time.h" + +#include "BLI_threads.h" #include "BLI_rand.h" #ifdef HAVE_CONFIG_H @@ -163,15 +165,14 @@ void BLI_array_randomize(void *data, int elemSize, int numElems, unsigned int se } /* ********* for threaded random ************** */ -#define MAX_RNG_THREADS 16 -static RNG rng_tab[MAX_RNG_THREADS]; +static RNG rng_tab[BLENDER_MAX_THREADS]; void BLI_thread_srandom(int thread, unsigned int seed) { extern unsigned char hash[]; // noise.c - if(thread >= MAX_RNG_THREADS) + if(thread >= BLENDER_MAX_THREADS) thread= 0; rng_seed(&rng_tab[thread], seed + hash[seed & 255]); |