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>
Wed, 24 Jun 2009 02:31:13 +0000 (19:31 -0700)
It's the last addressable byte, not the byte after the end of the buffer.

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:
     */