glthread: determine global locking once every 64 batches to fix get_time perf
This mitigates a large perf degradation when the clock source is HPET instead of TSC.
Just call get_time less frequently.
Fixes:
3ed141e9 - glthread: add a heuristic to stop locking global mutexes with multiple contexts
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8910
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24168>