diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c index 8ca796f..d0f0bee 100644 --- a/src/mesa/drivers/dri/i915/i830_state.c +++ b/src/mesa/drivers/dri/i915/i830_state.c @@ -474,7 +474,7 @@ static void i830PolygonStipple(struct gl_context * ctx, const GLubyte * mask) { struct i830_context *i830 = i830_context(ctx); - const GLubyte *m = mask; + const GLubyte *m; GLubyte p[4]; int i, j, k; int active = (ctx->Polygon.StippleFlag && @@ -486,6 +486,12 @@ i830PolygonStipple(struct gl_context * ctx, const GLubyte * mask) i830->state.Stipple[I830_STPREG_ST1] &= ~ST1_ENABLE; } + /* Use the already unpacked stipple data from the context rather than the + * uninterpreted mask passed in. + */ + mask = (const GLubyte *)ctx->PolygonStipple; + m = mask; + p[0] = mask[12] & 0xf; p[0] |= p[0] << 4; p[1] = mask[8] & 0xf;