Add some heuristics for when to parallelize the model data calculations
The cost of parallelizing and synchronization will be higher then the
cost of just doing the calculations of the normal matrix and MVP
sequentially on the calling thread. Even on modern and powerful machines
this becomes visible while benchmarking. The right cut-off value can be
hard to determine as it will depend on the target hardware, so the exact
value is configurable through an environment variable. By default we cut
off at 32, which should filter out the smallest scene from paying the
overhead. In addition the synchronization primitives are guarded and
made into member variables; This ensures the cost of using them aren't
paid when for small scenes and that we don't re-creating them each
frame.
Pick-to: 6.12 6.11
Change-Id: I7813e52ad224ad770c6dde7699fe46caa1ded024
Reviewed-by: Andy Nichols <andy.nichols@qt.io>