i965: Only flag the new-batch related state as dirty at new batch time.
authorEric Anholt <eric@anholt.net>
Tue, 14 Jun 2011 22:48:24 +0000 (15:48 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 18 Jun 2011 23:00:45 +0000 (16:00 -0700)
This was debug code from the initial import of the driver.  No
statistically significant performance difference on cairo-gl or
nexuiz (n=6).

src/mesa/drivers/dri/i965/brw_vtbl.c

index 69650e1df778b04105bdca033410dd9829869c85..236c4d297d1fed713dc576bd1382ae9848da2510 100644 (file)
@@ -122,11 +122,7 @@ static void brw_new_batch( struct intel_context *intel )
     * This is probably not as severe as on 915, since almost all of our state
     * is just in referenced buffers.
     */
-   brw->state.dirty.brw |= BRW_NEW_CONTEXT;
-
-   brw->state.dirty.mesa |= ~0;
-   brw->state.dirty.brw |= ~0;
-   brw->state.dirty.cache |= ~0;
+   brw->state.dirty.brw |= BRW_NEW_CONTEXT | BRW_NEW_BATCH;
 
    brw->vb.nr_current_buffers = 0;
 }