i965: Fix the last valid address setting for the index buffer.
authorEric Anholt <eric@anholt.net>
Sun, 11 Oct 2009 18:16:03 +0000 (11:16 -0700)
committerEric Anholt <eric@anholt.net>
Sun, 11 Oct 2009 18:21:03 +0000 (11:21 -0700)
Again, last valid address, not first invalid address.  Fixes regression
in 255e5be265133280293bbfd8b2f9b74b2dec50bb that the kernel now catches
and caused piglit draw_elements_base_vertex to fail.

src/mesa/drivers/dri/i965/brw_draw_upload.c

index 5c33246749897ab6c087a987ed1fb78d892738e1..9d089e113e6f5606800d1ba9803b3164c347d24b 100644 (file)
@@ -726,7 +726,7 @@ static void brw_emit_index_buffer(struct brw_context *brw)
                brw->ib.offset);
       OUT_RELOC(brw->ib.bo,
                I915_GEM_DOMAIN_VERTEX, 0,
-               brw->ib.offset + brw->ib.size);
+               brw->ib.offset + brw->ib.size - 1);
       OUT_BATCH( 0 );
       ADVANCE_BATCH();
    }