This fixes a crash when stippling using data from a PBO.
i915PolygonStipple(GLcontext * ctx, const GLubyte * mask)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
- const GLubyte *m = mask;
+ const GLubyte *m;
GLubyte p[4];
int i, j, k;
int active = (ctx->Polygon.StippleFlag &&
i915->state.Stipple[I915_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;