summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-05-26 19:48:08 -0700
committerEric Anholt <eric@anholt.net>2009-05-26 19:50:23 -0700
commit0e83e8f51af07a3066519f169f07d9afbf23252e (patch)
treef15fe138c0941c73f61da20009453d6a13e476e7 /src/mesa/drivers/dri/i915
parent9178b31546e9817a0c9712f702b21f8c54efbd84 (diff)
i915: Restore the Viewport and DepthRange functions on 8xx.
Fixes failed viewport updates on glxgears (and other apps) resize since e41780fedc2c1f22b43118da30a0103fa68b769f. Bug #20473.
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index d9cad0c4bf..8ef6c9144f 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -39,6 +39,7 @@
#include "intel_screen.h"
#include "intel_batchbuffer.h"
#include "intel_fbo.h"
+#include "intel_buffers.h"
#include "i830_context.h"
#include "i830_reg.h"
@@ -446,6 +447,24 @@ i830DepthMask(GLcontext * ctx, GLboolean flag)
i830->state.Ctx[I830_CTXREG_ENABLES_2] |= DISABLE_DEPTH_WRITE;
}
+/** Called from ctx->Driver.Viewport() */
+static void
+i830Viewport(GLcontext * ctx,
+ GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ intelCalcViewport(ctx);
+
+ intel_viewport(ctx, x, y, width, height);
+}
+
+
+/** Called from ctx->Driver.DepthRange() */
+static void
+i830DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
+{
+ intelCalcViewport(ctx);
+}
+
/* =============================================================
* Polygon stipple
*
@@ -1064,6 +1083,8 @@ i830InitStateFuncs(struct dd_function_table *functions)
functions->StencilFuncSeparate = i830StencilFuncSeparate;
functions->StencilMaskSeparate = i830StencilMaskSeparate;
functions->StencilOpSeparate = i830StencilOpSeparate;
+ functions->DepthRange = i830DepthRange;
+ functions->Viewport = i830Viewport;
}
void