i915tex: The intended triple buffering fix.
authorMichel Dänzer <michel@tungstengraphics.com>
Mon, 19 Mar 2007 17:34:27 +0000 (18:34 +0100)
committerMichel Dänzer <michel@tungstengraphics.com>
Mon, 19 Mar 2007 17:34:27 +0000 (18:34 +0100)
Making modifications while the editor spawned by git-commit was suspended
didn't have the intended effect.

src/mesa/drivers/dri/i915tex/intel_buffers.c
src/mesa/drivers/dri/i915tex/intel_context.c

index c0b4f438be967da279f9931c5f9a764c506b0660..62ff54b00751c3241967742edd1a6375205bba99 100644 (file)
@@ -349,28 +349,6 @@ intelWindowMoved(struct intel_context *intel)
 
    /* Update Mesa's notion of window size */
    driUpdateFramebufferSize(ctx, dPriv);
-
-   /* Update size of third renderbuffer */
-   if (intel_fb->pf_num_pages == 3) {
-      struct gl_renderbuffer *rb = &intel_fb->color_rb[(intel_fb->pf_current_page
-                                                       + 2) % 3]->Base;
-
-      /* only resize if size is changing */
-         if (rb->Width != intel_fb->Base.Width ||
-            rb->Height != intel_fb->Base.Height) {
-            /* could just as well pass rb->_ActualFormat here */
-            if (rb->AllocStorage(ctx, rb, rb->InternalFormat,
-                                intel_fb->Base.Width, intel_fb->Base.Height)) {
-               ASSERT(rb->Width == intel_fb->Base.Width);
-               ASSERT(rb->Height == intel_fb->Base.Height);
-            }
-            else {
-               _mesa_error(ctx, GL_OUT_OF_MEMORY, "Resizing framebuffer");
-               /* no return */
-            }
-         }
-   }
-
    intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
 
    /* Update hardware scissor */
index 5c2cdf0c7d620cfc7d10ace992b15fcbc9472f99..acda7b1c16d0faf644ce575e5b097be4f49a0987 100644 (file)
@@ -581,11 +581,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
       }
 
       /* set GLframebuffer size to match window, if needed */
-      if (intel_fb->Base.Width != driDrawPriv->w) {
-         _mesa_resize_framebuffer(&intel->ctx, &intel_fb->Base,
-                                  driDrawPriv->w, driDrawPriv->h);
-      }         
-      if (readFb->Width != driReadPriv->w) {
+      if (driReadPriv != driDrawPriv && readFb->Width != driReadPriv->w) {
          _mesa_resize_framebuffer(&intel->ctx, readFb,
                                   driReadPriv->w, driReadPriv->h);
       }