diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-12-20 12:04:52 +0100 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-12-20 12:09:09 +0100 |
commit | ccbb5923ac12f38b9bc47448a45340dd0534eabc (patch) | |
tree | 252133f1971dfa15fe9219df7f883d42b8838e67 /editor/translations/pr.po | |
parent | b08735f20987a6188fd54c5e2dcd072dc316b413 (diff) |
Fix lightmapper rng
In our previous attempts to fix the lightmapper we may have
inadvertently introduced the same issue we were trying to fix. It
appears that rand() will on some platforms introduce a mutex making it
slower and on others may have a per-thread state that would need to be
initialized with srand() on each thread. This slows down the lightbaking
further.
This sets up a separate rng state for each OpenMP thread by calling
rand() only in the single-threaded part of the code. We then keep a
vector of states.
I believe this solves our problems.
Diffstat (limited to 'editor/translations/pr.po')
0 files changed, 0 insertions, 0 deletions