Commit Graph

3 Commits

Author SHA1 Message Date
Eric Engestrom f50f26325f util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* uint64_t
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>
2020-05-16 12:05:37 +00:00
Timothy Arceri dd00a3c923 util/rand_xor: add function to seed rand
V2: pass the seed to the seed function so that we can isolate
    its uses. Stop leaking fd when urandom couldn't be read.

Reviewed-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-23 08:16:29 +11:00
Timothy Arceri 53660c2366 util: move rand_xorshift128plus() to utils
V2: pass the seed to rand_xorshift128plus() so that we can isolate
    its uses.

Reviewed-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-23 08:16:29 +11:00