OSDN Git Service

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 1b8bcc1..3ef56a0 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:
     */