From dddedd915afb58ab6b87492e850baeadc007fe47 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 24 Apr 2008 12:36:04 +0100 Subject: xlib: only shortcircuit makecurrent if NO_RAST set, otherwise window size updates fail --- src/gallium/winsys/xlib/fakeglx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/winsys/xlib/fakeglx.c b/src/gallium/winsys/xlib/fakeglx.c index 6e04cb4117c..ec77e81fedb 100644 --- a/src/gallium/winsys/xlib/fakeglx.c +++ b/src/gallium/winsys/xlib/fakeglx.c @@ -1459,6 +1459,13 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx ) { struct fake_glx_context *glxCtx = (struct fake_glx_context *) ctx; + static boolean firsttime = 1, no_rast = 0; + + if (firsttime) { + no_rast = getenv("SP_NO_RAST") != NULL; + firsttime = 0; + } + if (ctx && draw && read) { XMesaBuffer drawBuffer, readBuffer; @@ -1504,7 +1511,8 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, #endif } - if (MakeCurrent_PrevContext == ctx && + if (no_rast && + MakeCurrent_PrevContext == ctx && MakeCurrent_PrevDrawable == draw && MakeCurrent_PrevReadable == read && MakeCurrent_PrevDrawBuffer == drawBuffer && -- cgit v1.2.3