Module: Mesa
Branch: mesa_7_5_branch
Commit: 213ac4bb5de1cef601e0677ef2e5ca1779851e28
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=213ac4bb5de1cef601e0677ef2e5ca1779851e28

Author: Eric Anholt <[email protected]>
Date:   Tue Jun 23 19:30:25 2009 -0700

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)

---

 src/mesa/drivers/dri/i965/brw_draw_upload.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c 
b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 1b8bcc1..3ef56a0 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:
     */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to