intel: Don't update renderbuffers in intelSetTexBuffer2 if we have invalidate
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 11 May 2010 14:32:40 +0000 (10:32 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 11 May 2010 14:32:40 +0000 (10:32 -0400)
src/mesa/drivers/dri/intel/intel_tex_image.c

index 136fda27f65dad61b8554dd60e17906ce7271bba..7784223abba9877efed6473341c2e9f7aada3403 100644 (file)
@@ -728,7 +728,9 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
    if (!intelObj)
       return;
 
-   intel_update_renderbuffers(pDRICtx, dPriv);
+   if (dPriv->lastStamp != dPriv->dri2.stamp ||
+       !pDRICtx->driScreenPriv->dri2.useInvalidate)
+      intel_update_renderbuffers(pDRICtx, dPriv);
 
    rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
    /* If the region isn't set, then intel_update_renderbuffers was unable