diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2007-11-03 01:31:47 +0000 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2007-11-03 02:01:32 +0000 |
commit | 5fa6ea68586e906a984291dd4c20f664924157eb (patch) | |
tree | 1d0f22c5e99e7891447847109249cc5c611e73af /src/mesa/pipe/i915simple/i915_prim_emit.c | |
parent | 5c1606a2b3e951c32f028e0b328e6c06e9424e28 (diff) |
Do something sensible when failed to reserve space in the batch buffer.
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_prim_emit.c')
-rw-r--r-- | src/mesa/pipe/i915simple/i915_prim_emit.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_emit.c b/src/mesa/pipe/i915simple/i915_prim_emit.c index 40e33e6e09..0a8be79ae4 100644 --- a/src/mesa/pipe/i915simple/i915_prim_emit.c +++ b/src/mesa/pipe/i915simple/i915_prim_emit.c @@ -123,7 +123,6 @@ emit_prim( struct draw_stage *stage, { struct i915_context *i915 = setup_stage(stage)->i915; unsigned vertex_size = i915->current.vertex_info.size * 4; /* in bytes */ - unsigned *ptr; unsigned i; assert(vertex_size >= 12); /* never smaller than 12 bytes */ @@ -134,8 +133,7 @@ emit_prim( struct draw_stage *stage, if (i915->hardware_dirty) i915_emit_hardware_state( i915 ); - ptr = BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 ); - if (ptr == 0) { + if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) { FLUSH_BATCH(); /* Make sure state is re-emitted after a flush: @@ -143,8 +141,7 @@ emit_prim( struct draw_stage *stage, i915_update_derived( i915 ); i915_emit_hardware_state( i915 ); - ptr = BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 ); - if (ptr == 0) { + if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) { assert(0); return; } |