From 7c9a1357beabd6d0df88142d31cd5d77a012e85a Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 9 Aug 2007 18:07:42 +0100 Subject: Add more i915 state packets. These correspond to the dynamic indirect state, though they are currently just pushed straight to the batch buffer. --- src/mesa/pipe/i915simple/i915_prim_emit.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/mesa/pipe/i915simple/i915_prim_emit.c') diff --git a/src/mesa/pipe/i915simple/i915_prim_emit.c b/src/mesa/pipe/i915simple/i915_prim_emit.c index 18918459a8..5173fc0b38 100644 --- a/src/mesa/pipe/i915simple/i915_prim_emit.c +++ b/src/mesa/pipe/i915simple/i915_prim_emit.c @@ -116,7 +116,6 @@ emit_prim( struct draw_stage *stage, unsigned nr ) { struct i915_context *i915 = setup_stage(stage)->i915; - struct i915_winsys *winsys = i915->winsys; unsigned vertex_size = 4 * sizeof(int); unsigned *ptr; unsigned i; @@ -127,10 +126,16 @@ emit_prim( struct draw_stage *stage, if (i915->hardware_dirty) i915_emit_hardware_state( i915 ); - ptr = winsys->batch_start( winsys, nr * vertex_size, 0 ); + ptr = BEGIN_BATCH( nr * vertex_size, 0 ); if (ptr == 0) { - winsys->batch_flush( winsys ); - ptr = winsys->batch_start( winsys, nr * vertex_size, 0 ); + FLUSH_BATCH(); + + /* Make sure state is re-emitted after a flush: + */ + i915_update_derived( i915 ); + i915_emit_hardware_state( i915 ); + + ptr = BEGIN_BATCH( nr * vertex_size, 0 ); if (ptr == 0) { assert(0); return; -- cgit v1.2.3