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.
This commit is contained in:
Keith Whitwell
2009-03-18 19:14:45 +00:00
parent caf99be999
commit 08d44512e9
2 changed files with 5 additions and 5 deletions

View File

@@ -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);