summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKurt Roeckx <[email protected]>2012-03-02 17:31:23 -0800
committerEric Anholt <[email protected]>2012-03-02 17:32:15 -0800
commit489ac8e73a2432d29597a62cd83f09b9d1848533 (patch)
tree215928c8ec47ba32d1332f6b73687de616054f41 /src
parent024ece7523f1735d2fca0067c0a3bdcf53fde8f9 (diff)
i915: Fix i830 polygon stipple from PBOs.
This is a direct port of the i915 patch in a856da63247a4b403f6350914f732e14d1530ed1. Fixes glean's pbo test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41372 Reviewed-by: Eric Anholt <[email protected]> NOTE: This is a candidate for release branches.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index c6f1b038e32..ea6e0beaeab 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -476,7 +476,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 &&
@@ -488,6 +488,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;