summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-03-18 19:14:45 +0000
committerKeith Whitwell <keithw@vmware.com>2009-03-18 19:14:45 +0000
commit08d44512e973f1388f8b1d4436cc2aa888c6060e (patch)
tree6898fc211ac4eb4894fb18f671bc8fa2f6caa3c9 /src/mesa
parentcaf99be99976166f92d90203966a2dd42634e2af (diff)
st: call _glapi_check_multithread from st_make_current
This function is called from many OS-dependent versions of MakeCurrent. Move the check for multithreading to this central location to avoid having to make this check from all the callers.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2e1f6d4bcf..b27274725f 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -254,6 +254,11 @@ void st_make_current(struct st_context *st,
struct st_framebuffer *draw,
struct st_framebuffer *read)
{
+ /* Call this periodically to detect when the user has begun using
+ * GL rendering from multiple threads.
+ */
+ _glapi_check_multithread();
+
if (st) {
GLboolean firstTime = st->ctx->FirstTimeCurrent;
_mesa_make_current(st->ctx, &draw->Base, &read->Base);