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:
@@ -1058,11 +1058,6 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
|
|||||||
c->xm_buffer = drawBuffer;
|
c->xm_buffer = drawBuffer;
|
||||||
c->xm_read_buffer = readBuffer;
|
c->xm_read_buffer = readBuffer;
|
||||||
|
|
||||||
/* Call this periodically to detect when the user has begun using
|
|
||||||
* GL rendering from multiple threads.
|
|
||||||
*/
|
|
||||||
_glapi_check_multithread();
|
|
||||||
|
|
||||||
st_make_current(c->st, drawBuffer->stfb, readBuffer->stfb);
|
st_make_current(c->st, drawBuffer->stfb, readBuffer->stfb);
|
||||||
|
|
||||||
xmesa_check_and_update_buffer_size(c, drawBuffer);
|
xmesa_check_and_update_buffer_size(c, drawBuffer);
|
||||||
|
@@ -254,6 +254,11 @@ void st_make_current(struct st_context *st,
|
|||||||
struct st_framebuffer *draw,
|
struct st_framebuffer *draw,
|
||||||
struct st_framebuffer *read)
|
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) {
|
if (st) {
|
||||||
GLboolean firstTime = st->ctx->FirstTimeCurrent;
|
GLboolean firstTime = st->ctx->FirstTimeCurrent;
|
||||||
_mesa_make_current(st->ctx, &draw->Base, &read->Base);
|
_mesa_make_current(st->ctx, &draw->Base, &read->Base);
|
||||||
|
Reference in New Issue
Block a user