summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/xlib/fakeglx.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-04-22 11:15:51 +0100
committerKeith Whitwell <[email protected]>2008-04-22 11:15:51 +0100
commit6a9f6625b38c3669769568d122958993f4a8d5b3 (patch)
tree5f56b5fa938c3f1a77b2419823b7f392d7d5a0c6 /src/gallium/winsys/xlib/fakeglx.c
parentd07ed9216cc7033fecb5bce661bbaf79189bb391 (diff)
xlib: shortcircuit no-op makecurrent
Diffstat (limited to 'src/gallium/winsys/xlib/fakeglx.c')
-rw-r--r--src/gallium/winsys/xlib/fakeglx.c7
1 files changed, 7 insertions, 0 deletions
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;