From: Eric Anholt Date: Wed, 24 Jun 2009 02:30:25 +0000 (-0700) Subject: i965: Set the max index buffer address correctly according to the docs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=213ac4bb5de1cef601e0677ef2e5ca1779851e28;p=mesa.git i965: Set the max index buffer address correctly according to the docs. It's the last addressable byte, not the byte after the end of the buffer. (cherry picked from commit b72dea5441e8e9226dabf1826fa3bc129c7bc281) --- diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 1b8bcc14ec0..3ef56a00683 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -635,7 +635,7 @@ static void brw_emit_indices(struct brw_context *brw) if (index_buffer == NULL) return; - ib_size = get_size(index_buffer->type) * index_buffer->count; + ib_size = get_size(index_buffer->type) * index_buffer->count - 1; /* Emit the indexbuffer packet: */