From: Eric Anholt Date: Sun, 11 Oct 2009 18:16:03 +0000 (-0700) Subject: i965: Fix the last valid address setting for the index buffer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3be27c0cf8a4c47230f31d9d66bde7340ffb204;p=mesa.git i965: Fix the last valid address setting for the index buffer. 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. --- diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 5c332467498..9d089e113e6 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -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(); }