i965g: don't emit line stipple packet if stipple disabled
authorKeith Whitwell <keithw@vmware.com>
Fri, 6 Nov 2009 08:57:40 +0000 (08:57 +0000)
committerKeith Whitwell <keithw@vmware.com>
Fri, 6 Nov 2009 08:57:40 +0000 (08:57 +0000)
src/gallium/drivers/i965/brw_misc_state.c

index ce3e48f36075aa399b214d02befe35b89721b959..5ee87bcac0807223c57f00dc6fa65d24bf58cd59 100644 (file)
@@ -344,7 +344,9 @@ const struct brw_tracked_state brw_polygon_stipple = {
 static int upload_line_stipple(struct brw_context *brw)
 {
    const struct brw_line_stipple *bls = &brw->curr.rast->bls;
-   BRW_CACHED_BATCH_STRUCT(brw, bls);
+   if (bls->header.opcode) {
+      BRW_CACHED_BATCH_STRUCT(brw, bls);
+   }
    return 0;
 }