i965: Set the max index buffer address correctly according to the docs.
authorEric Anholt <eric@anholt.net>
Wed, 24 Jun 2009 02:30:25 +0000 (19:30 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 Sep 2009 21:12:35 +0000 (14:12 -0700)
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

index 1b8bcc14ec0b56db94d948cb31fb181a3ab74a20..3ef56a0068329831c2d9c4c33e1c04aa4d23022a 100644 (file)
@@ -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:
     */