summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_prim_emit.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-08-09 18:07:42 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2007-08-09 18:09:09 +0100
commit7c9a1357beabd6d0df88142d31cd5d77a012e85a (patch)
treec9b098a7c3de4bf44858de4d72cbead8d59bafcf /src/mesa/pipe/i915simple/i915_prim_emit.c
parentb3efc75f1a3496cbd0b93b5eff497a92fa31dc3b (diff)
Add more i915 state packets.
These correspond to the dynamic indirect state, though they are currently just pushed straight to the batch buffer.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_prim_emit.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_emit.c13
1 files changed, 9 insertions, 4 deletions
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;