diff options
author | José Fonseca <[email protected]> | 2007-10-29 10:25:02 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2007-10-29 12:15:57 +0000 |
commit | 02091e0f9c041250ea5abea6a5aa739d8e19c852 (patch) | |
tree | 970fbc8f0bde5b451bfeff96a62270a8c1d3a0fb /src/mesa | |
parent | dbb33a9710e64243ba8c69f44a149376300da2aa (diff) |
Reserve the accurate number of dwords in the batch buffer.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_prim_emit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_emit.c b/src/mesa/pipe/i915simple/i915_prim_emit.c index fcf3c99cac8..40e33e6e096 100644 --- a/src/mesa/pipe/i915simple/i915_prim_emit.c +++ b/src/mesa/pipe/i915simple/i915_prim_emit.c @@ -134,7 +134,7 @@ emit_prim( struct draw_stage *stage, if (i915->hardware_dirty) i915_emit_hardware_state( i915 ); - ptr = BEGIN_BATCH( nr * vertex_size, 0 ); + ptr = BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 ); if (ptr == 0) { FLUSH_BATCH(); @@ -143,7 +143,7 @@ emit_prim( struct draw_stage *stage, i915_update_derived( i915 ); i915_emit_hardware_state( i915 ); - ptr = BEGIN_BATCH( nr * vertex_size, 0 ); + ptr = BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 ); if (ptr == 0) { assert(0); return; @@ -157,10 +157,8 @@ emit_prim( struct draw_stage *stage, hwprim | ((4 + vertex_size * nr)/4 - 2)); - for (i = 0; i < nr; i++) { + for (i = 0; i < nr; i++) emit_hw_vertex(i915, prim->v[i]); - ptr += vertex_size / sizeof(int); - } } |