i965: Don't upload line stipple pattern unless we're stippling.
authorEric Anholt <eric@anholt.net>
Fri, 19 Nov 2010 15:02:07 +0000 (23:02 +0800)
committerEric Anholt <eric@anholt.net>
Tue, 23 Nov 2010 17:23:30 +0000 (09:23 -0800)
src/mesa/drivers/dri/i965/brw_misc_state.c

index 8dae58784c32871ce6c39fae13e15a4319ae21bb..c5fcdde3258e6ea26a3f2beafef59958dd57952f 100644 (file)
@@ -426,6 +426,9 @@ static void upload_line_stipple(struct brw_context *brw)
    GLfloat tmp;
    GLint tmpi;
 
+   if (!ctx->Line.StippleFlag)
+      return;
+
    memset(&bls, 0, sizeof(bls));
    bls.header.opcode = CMD_LINE_STIPPLE_PATTERN;
    bls.header.length = sizeof(bls)/4 - 2;