diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-19 05:11:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-19 19:14:16 +0300 |
commit | cfa8b762e20dce2e59aff5dffed872a9e3631f3c (patch) | |
tree | 60af71217099a654f1ced2de0c6a730fbd9b0fdc /intern/cycles/kernel/kernel_types.h | |
parent | 1cc4033df8d7fdd87bc1be14e265ab77f0713e54 (diff) |
Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index f1b82eee352..58371c56267 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -242,10 +242,6 @@ CCL_NAMESPACE_BEGIN # undef __DENOISING_FEATURES__ #endif -/* Random Numbers */ - -typedef uint RNG; - /* Shader Evaluation */ typedef enum ShaderEvalType { @@ -1023,6 +1019,7 @@ typedef struct PathState { int flag; /* random number generator state */ + uint rng_hash; /* per pixel hash */ int rng_offset; /* dimension offset */ int sample; /* path sample number */ int num_samples; /* total number of times this path will be sampled */ @@ -1048,7 +1045,7 @@ typedef struct PathState { /* volume rendering */ #ifdef __VOLUME__ int volume_bounce; - RNG rng_congruential; + uint rng_congruential; VolumeStack volume_stack[VOLUME_STACK_SIZE]; #endif } PathState; |