summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-11-02 19:18:09 +0000
committerBrian Paul <[email protected]>2006-11-02 19:18:09 +0000
commitdf5edb21f8f01f8d3e9b87b8103685690b35646f (patch)
tree0470cab6fa41a11d44b742fa9024b4f627759fff
parentc97bc619d63cafb7b0bb3724b07734e6cbd296e5 (diff)
Fixes Glean vertex/fragment test failures. Those tests never called
glViewport so the viewport was 0 by 0 pixels.
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index 080ff10d889..c77d365360d 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -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: