move st_make_current() before buffer size check so renderbuffer alloc storage works
authorBrian <brian.paul@tungstengraphics.com>
Wed, 19 Dec 2007 15:50:35 +0000 (08:50 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 19 Dec 2007 20:16:36 +0000 (13:16 -0700)
src/mesa/pipe/xlib/xm_api.c

index 142074bc650b65d29a12fd23ac7c1e708e3c9948..186a712b52c3b612937875de66d01267946275ea 100644 (file)
@@ -1067,12 +1067,12 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
        */
       _glapi_check_multithread();
 
+      st_make_current(c->st, drawBuffer->stfb, readBuffer->stfb);
+
       xmesa_check_and_update_buffer_size(c, drawBuffer);
       if (readBuffer != drawBuffer)
          xmesa_check_and_update_buffer_size(c, readBuffer);
 
-      st_make_current(c->st, drawBuffer->stfb, readBuffer->stfb);
-
       /* Solution to Stephane Rehel's problem with glXReleaseBuffersMESA(): */
       drawBuffer->wasCurrent = GL_TRUE;
    }