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.
This commit is contained in:
Kristian Høgsberg
2010-05-21 11:51:33 -04:00
parent 643b2af020
commit ab780bccb7
+9
View File
@@ -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,