Update seed_rng() in stdlib to take a varying seed.

Previously, we were trying to take a uniform seed and then shuffle that
around to initialize the state for each of the program instances.  This
was becoming increasingly untenable and brittle.

Now a varying seed is expected and used.
This commit is contained in:
Matt Pharr
2012-05-30 10:35:41 -07:00
parent 5cb53f52c3
commit 8fd9b84a80
6 changed files with 11 additions and 58 deletions

View File

@@ -3147,7 +3147,7 @@ library. State for the RNG is maintained in an instance of the
::
struct RNGState;
void seed_rng(varying RNGState * uniform state, uniform int seed)
void seed_rng(varying RNGState * uniform state, int seed)
void seed_rng(uniform RNGState * uniform state, uniform int seed)
After the RNG is seeded, the ``random()`` function can be used to get a