From: Keith Whitwell Date: Tue, 22 Apr 2008 10:15:51 +0000 (+0100) Subject: xlib: shortcircuit no-op makecurrent X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a9f6625b38c3669769568d122958993f4a8d5b3;p=mesa.git xlib: shortcircuit no-op makecurrent --- diff --git a/src/gallium/winsys/xlib/fakeglx.c b/src/gallium/winsys/xlib/fakeglx.c index 902a7550754..6e04cb4117c 100644 --- a/src/gallium/winsys/xlib/fakeglx.c +++ b/src/gallium/winsys/xlib/fakeglx.c @@ -1504,6 +1504,13 @@ Fake_glXMakeContextCurrent( Display *dpy, GLXDrawable draw, #endif } + if (MakeCurrent_PrevContext == ctx && + MakeCurrent_PrevDrawable == draw && + MakeCurrent_PrevReadable == read && + MakeCurrent_PrevDrawBuffer == drawBuffer && + MakeCurrent_PrevReadBuffer == readBuffer) + return True; + MakeCurrent_PrevContext = ctx; MakeCurrent_PrevDrawable = draw; MakeCurrent_PrevReadable = read;