From df5edb21f8f01f8d3e9b87b8103685690b35646f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Nov 2006 19:18:09 +0000 Subject: Fixes Glean vertex/fragment test failures. Those tests never called glViewport so the viewport was 0 by 0 pixels. --- src/mesa/drivers/dri/i915tex/intel_context.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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: -- cgit v1.2.3