r300g: mark rasterizer_state as dirty only when it's not NULL
authorMarek Olšák <maraeo@gmail.com>
Sat, 27 Feb 2010 19:00:38 +0000 (20:00 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sat, 27 Feb 2010 19:08:46 +0000 (20:08 +0100)
src/gallium/drivers/r300/r300_state.c

index ee4409c88998dc4bbc9c6c73ad6615d3385b38bb..0fbb9e771629b9261b406a275d1d80d9693fbbb2 100644 (file)
@@ -824,13 +824,13 @@ static void r300_bind_rs_state(struct pipe_context* pipe, void* state)
     if (rs) {
         r300->tcl_bypass = rs->rs.bypass_vs_clip_and_viewport;
         r300->polygon_offset_enabled = rs->rs.offset_cw || rs->rs.offset_ccw;
+        r300->rs_state.dirty = TRUE;
     } else {
         r300->tcl_bypass = FALSE;
         r300->polygon_offset_enabled = FALSE;
     }
 
     r300->rs_state.state = rs;
-    r300->rs_state.dirty = TRUE;
     /* XXX Why is this still needed, dammit!? */
     r300->scissor_state.dirty = TRUE;
     r300->viewport_state.dirty = TRUE;