Mesa (master): glx/dri2: Don't call X server for SwapBuffers when there' s no back buffer.
Michel Dänzer
daenzer at kemper.freedesktop.org
Wed Sep 14 16:40:26 UTC 2011
Module: Mesa
Branch: master
Commit: d8c443ddde5e9734d60b63b3ec3b5a5ba756d022
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8c443ddde5e9734d60b63b3ec3b5a5ba756d022
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Wed Sep 14 18:37:48 2011 +0200
glx/dri2: Don't call X server for SwapBuffers when there's no back buffer.
As already done in dri2CopySubBuffer().
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=36371
https://bugs.freedesktop.org/show_bug.cgi?id=40533
Might fix:
https://bugs.freedesktop.org/show_bug.cgi?id=32589
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/glx/dri2_glx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index b83da60..2d72ae0 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -543,6 +543,10 @@ dri2SwapBuffers(__GLXDRIdrawable *pdraw, int64_t target_msc, int64_t divisor,
(struct dri2_display *)dpyPriv->dri2Display;
CARD64 ret = 0;
+ /* Check we have the right attachments */
+ if (!priv->have_back)
+ return ret;
+
/* Old servers can't handle swapbuffers */
if (!pdp->swapAvailable) {
dri2CopySubBuffer(pdraw, 0, 0, priv->width, priv->height);
More information about the mesa-commit
mailing list