Fixes Glean vertex/fragment test failures. Those tests never called
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Nov 2006 19:18:09 +0000 (19:18 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 2 Nov 2006 19:18:09 +0000 (19:18 +0000)
glViewport so the viewport was 0 by 0 pixels.

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

index 080ff10d8899c4d1823109cead5b0bfa299e0062..c77d365360d6bd47f5c79800bcb558b2defb89c9 100644 (file)
@@ -577,6 +577,16 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
          }
       }
 
+      /* set initial GLframebuffer size to match window, if needed */
+      if (drawFb->Width == 0 && driDrawPriv->w) {
+         _mesa_resize_framebuffer(&intel->ctx, drawFb,
+                                  driDrawPriv->w, driDrawPriv->h);
+      }         
+      if (readFb->Width == 0 && driReadPriv->w) {
+         _mesa_resize_framebuffer(&intel->ctx, readFb,
+                                  driReadPriv->w, driReadPriv->h);
+      }         
+
       _mesa_make_current(&intel->ctx, drawFb, readFb);
 
       /* The drawbuffer won't always be updated by _mesa_make_current: