glthread: add a heuristic to stop locking global mutexes with multiple contexts

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4516
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8035

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21039>
This commit is contained in:
Marek Olšák
2023-02-01 06:29:00 -05:00
committed by Marge Bot
parent 78c61140f1
commit 3ed141e9d8
4 changed files with 87 additions and 8 deletions
+2
View File
@@ -43,6 +43,8 @@
extern "C" {
#endif
#define ONE_SECOND_IN_NS INT64_C(1000000000)
/* must be equal to PIPE_TIMEOUT_INFINITE */
#define OS_TIMEOUT_INFINITE 0xffffffffffffffffull