summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_prim_emit.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-09 12:02:45 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-09 15:46:15 +0100
commit277e4989f348913e3852f3d8c4efb82ba1380fcb (patch)
tree499f6a10de84f1d84dfd52db74091c9de53f490d /src/mesa/pipe/i915simple/i915_prim_emit.c
parentfb8caffea8ac9a8f8e2ee63959264abe8eb36c59 (diff)
Don't reemit hardware state *every* primitive.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_prim_emit.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_emit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_emit.c b/src/mesa/pipe/i915simple/i915_prim_emit.c
index 6d7cfe2e3e..a1e0e85196 100644
--- a/src/mesa/pipe/i915simple/i915_prim_emit.c
+++ b/src/mesa/pipe/i915simple/i915_prim_emit.c
@@ -120,7 +120,11 @@ emit_prim( struct draw_stage *stage,
unsigned *ptr;
unsigned i;
- i915_emit_hardware_state( i915 );
+ if (i915->dirty)
+ i915_update_derived( i915 );
+
+ if (i915->hw_dirty)
+ i915_emit_hardware_state( i915 );
ptr = winsys->batch_start( winsys, nr * vertex_size, 0 );
if (ptr == 0) {