summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_prim_vbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_prim_vbuf.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_vbuf.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_vbuf.c b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
index 6f497879ad..3632adce79 100644
--- a/src/mesa/pipe/i915simple/i915_prim_vbuf.c
+++ b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
@@ -303,12 +303,7 @@ static void vbuf_draw( struct draw_stage *stage )
if (i915->hardware_dirty)
i915_emit_hardware_state( i915 );
- ptr = BEGIN_BATCH( 4 + (nr + 1)/2, 1 );
-#if 1
- assert(ptr);
-#else
- /* XXX: below is bogus as ptr always nonzero except in fatal errors */
- if (ptr == 0) {
+ if (!BEGIN_BATCH( 4 + (nr + 1)/2, 1 )) {
FLUSH_BATCH();
/* Make sure state is re-emitted after a flush:
@@ -316,13 +311,11 @@ static void vbuf_draw( struct draw_stage *stage )
i915_update_derived( i915 );
i915_emit_hardware_state( i915 );
- ptr = BEGIN_BATCH( 2, 1 );
- if (ptr == 0) {
+ if (!BEGIN_BATCH( 4 + (nr + 1)/2, 1 )) {
assert(0);
return;
}
}
-#endif
/* FIXME: don't do this every time */
OUT_BATCH( _3DSTATE_LOAD_STATE_IMMEDIATE_1 |