summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_buffers.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c
index a6b3298623..1ded0b5417 100644
--- a/src/mesa/drivers/dri/i915tex/intel_buffers.c
+++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c
@@ -36,6 +36,7 @@
#include "intel_batchbuffer.h"
#include "context.h"
#include "utils.h"
+#include "drirenderbuffer.h"
#include "framebuffer.h"
#include "swrast/swrast.h"
#include "vblank.h"
@@ -183,6 +184,8 @@ void
intelWindowMoved(struct intel_context *intel)
{
GLcontext *ctx = &intel->ctx;
+ __DRIdrawablePrivate *dPriv = intel->driDrawable;
+ GLframebuffer *drawFb = (GLframebuffer *) dPriv->driverPrivate;
if (!intel->ctx.DrawBuffer) {
/* when would this happen? -BP */
@@ -194,7 +197,7 @@ intelWindowMoved(struct intel_context *intel)
}
else {
/* drawing to a window */
- switch (intel->ctx.DrawBuffer->_ColorDrawBufferMask[0]) {
+ switch (drawFb->_ColorDrawBufferMask[0]) {
case BUFFER_BIT_FRONT_LEFT:
intelSetFrontClipRects(intel);
break;
@@ -207,14 +210,11 @@ intelWindowMoved(struct intel_context *intel)
}
}
- /* this update Mesa's notion of window size */
- if (ctx->WinSysDrawBuffer) {
- _mesa_resize_framebuffer(ctx, ctx->WinSysDrawBuffer,
- intel->driDrawable->w, intel->driDrawable->h);
- }
+ /* Update Mesa's notion of window size */
+ driUpdateFramebufferSize(ctx, dPriv);
+ drawFb->Initialized = GL_TRUE; /* XXX remove someday */
- if (intel->intelScreen->driScrnPriv->ddxMinor >= 7 && intel->driDrawable) {
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
+ if (intel->intelScreen->driScrnPriv->ddxMinor >= 7) {
drmI830Sarea *sarea = intel->sarea;
drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w,
.y1 = dPriv->y, .y2 = dPriv->y + dPriv->h };
@@ -245,6 +245,9 @@ intelWindowMoved(struct intel_context *intel)
/* Update hardware scissor */
ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
ctx->Scissor.Width, ctx->Scissor.Height);
+
+ /* Re-calculate viewport related state */
+ ctx->Driver.DepthRange( ctx, ctx->Viewport.Near, ctx->Viewport.Far );
}