Moved _glapi_check_multithread() call into drivers, instead of in
_mesa_make_current(). This removes an ugly #if !defined(IN_DRI_DRIVER) from core Mesa.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 6.5
|
* Version: 6.5
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -1051,6 +1051,12 @@ OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
|
|||||||
ctx->height = height;
|
ctx->height = height;
|
||||||
|
|
||||||
osmesa_update_state( &ctx->mesa, 0 );
|
osmesa_update_state( &ctx->mesa, 0 );
|
||||||
|
|
||||||
|
/* Call this periodically to detect when the user has begun using
|
||||||
|
* GL rendering from multiple threads.
|
||||||
|
*/
|
||||||
|
_glapi_check_multithread();
|
||||||
|
|
||||||
_mesa_make_current( &ctx->mesa, ctx->gl_buffer, ctx->gl_buffer );
|
_mesa_make_current( &ctx->mesa, ctx->gl_buffer, ctx->gl_buffer );
|
||||||
|
|
||||||
if (ctx->userRowLength)
|
if (ctx->userRowLength)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 6.5
|
* Version: 6.5
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -2067,6 +2067,11 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
|
|||||||
|
|
||||||
c->xm_buffer = drawBuffer;
|
c->xm_buffer = drawBuffer;
|
||||||
|
|
||||||
|
/* Call this periodically to detect when the user has begun using
|
||||||
|
* GL rendering from multiple threads.
|
||||||
|
*/
|
||||||
|
_glapi_check_multithread();
|
||||||
|
|
||||||
_mesa_make_current(&(c->mesa),
|
_mesa_make_current(&(c->mesa),
|
||||||
&drawBuffer->mesa_buffer,
|
&drawBuffer->mesa_buffer,
|
||||||
&readBuffer->mesa_buffer);
|
&readBuffer->mesa_buffer);
|
||||||
|
@@ -1597,14 +1597,7 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(IN_DRI_DRIVER)
|
/* We used to call _glapi_check_multithread() here. Now do it in drivers */
|
||||||
/* We call this function periodically (just here for now) in
|
|
||||||
* order to detect when multithreading has begun. In a DRI driver, this
|
|
||||||
* step is done by the driver loader (e.g., libGL).
|
|
||||||
*/
|
|
||||||
_glapi_check_multithread();
|
|
||||||
#endif /* !defined(IN_DRI_DRIVER) */
|
|
||||||
|
|
||||||
_glapi_set_context((void *) newCtx);
|
_glapi_set_context((void *) newCtx);
|
||||||
ASSERT(_mesa_get_current_context() == newCtx);
|
ASSERT(_mesa_get_current_context() == newCtx);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user