Module: Mesa
Branch: master
Commit: ab780bccb737e0dc25a55b5e54faad9c4a790ac0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab780bccb737e0dc25a55b5e54faad9c4a790ac0

Author: Kristian Høgsberg <[email protected]>
Date:   Fri May 21 11:51:33 2010 -0400

glx: Invalidate drawable in glXBindTexImageEXT() if we don't get events

When we don't get invalidate events, we need to invalidate a drawable
before using it for tfp to make sure we have uptodate buffers.

---

 src/glx/dri2_glx.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index ba546a6..d474738 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -570,8 +570,17 @@ dri2_bind_tex_image(Display * dpy,
 {
    GLXContext gc = __glXGetCurrentContext();
    __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL);
+    __GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy);
+    __GLXDRIdisplayPrivate *pdp =
+       (__GLXDRIdisplayPrivate *) dpyPriv->dri2Display;
 
    if (pdraw != NULL) {
+
+#if __DRI2_FLUSH_VERSION >= 3
+      if (!pdp->invalidateAvailable && pdraw->psc->f)
+        pdraw->psc->f->invalidate(pdraw->driDrawable);
+#endif
+
       if (pdraw->psc->texBuffer->base.version >= 2 &&
          pdraw->psc->texBuffer->setTexBuffer2 != NULL) {
         (*pdraw->psc->texBuffer->setTexBuffer2) (gc->__driContext,

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to