summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915tex
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-07 18:01:39 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-07 18:01:39 +0100
commitfb3410297bb21a0eeda4d32698c2612f4e3cf40e (patch)
treef42d498c6ca309463efe8667cec5f9fe25023624 /src/mesa/drivers/dri/i915tex
parent0609b6afa8117893d7b36468158ac6ec2f5642bc (diff)
i915tex: Set framebuffer size to match window before calling _mesa_make_current.
Fixes issues with apps that don't call glViewport by default.
Diffstat (limited to 'src/mesa/drivers/dri/i915tex')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index b1352a766e..b8515fe9b8 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -580,6 +580,16 @@ 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) {
+ _mesa_resize_framebuffer(&intel->ctx, readFb,
+ driReadPriv->w, driReadPriv->h);
+ }
+
_mesa_make_current(&intel->ctx, &intel_fb->Base, readFb);
/* The drawbuffer won't always be updated by _mesa_make_current:
@@ -599,16 +609,6 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
intel_draw_buffer(&intel->ctx, &intel_fb->Base);
}
-
- /* set initial GLframebuffer size to match window, if needed */
- if (&intel_fb->Base.Width == 0 && driDrawPriv->w) {
- _mesa_resize_framebuffer(&intel->ctx, &intel_fb->Base,
- driDrawPriv->w, driDrawPriv->h);
- }
- if (readFb->Width == 0 && driReadPriv->w) {
- _mesa_resize_framebuffer(&intel->ctx, readFb,
- driReadPriv->w, driReadPriv->h);
- }
}
else {
_mesa_make_current(NULL, NULL, NULL);