summaryrefslogtreecommitdiff
path: root/src/mesa/main/glthread.h
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2023-07-15 08:22:37 -0400
committerMarge Bot <emma+marge@anholt.net>2023-07-17 13:16:47 +0000
commit6cda08416b10e43b0a75b4d0a649f8bf29a24a8a (patch)
tree7dacbdc6a70a646f670a268316df4dabbc38bc31 /src/mesa/main/glthread.h
parentd4b211bf1b9db21d8bd2d01a3ea4a7c9c4d10caf (diff)
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>
Diffstat (limited to 'src/mesa/main/glthread.h')
-rw-r--r--src/mesa/main/glthread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/glthread.h b/src/mesa/main/glthread.h
index 8fc35f38588..773c2f6e7c0 100644
--- a/src/mesa/main/glthread.h
+++ b/src/mesa/main/glthread.h
@@ -273,6 +273,10 @@ struct glthread_state
/** The last added call of the given function. */
struct marshal_cmd_CallList *LastCallList;
struct marshal_cmd_BindBuffer *LastBindBuffer;
+
+ /** Global mutex update info. */
+ unsigned GlobalLockUpdateBatchCounter;
+ bool LockGlobalMutexes;
};
void _mesa_glthread_init(struct gl_context *ctx);