i965g: propogate index size state
authorKeith Whitwell <keithw@vmware.com>
Fri, 6 Nov 2009 14:18:28 +0000 (14:18 +0000)
committerKeith Whitwell <keithw@vmware.com>
Fri, 6 Nov 2009 14:18:28 +0000 (14:18 +0000)
src/gallium/drivers/i965/brw_draw.c

index 88cb31ad5460c9b1086f0065f52a0387d7f220a5..84803e43beff16cd0120efa2c447e02d6c34c05c 100644 (file)
@@ -194,8 +194,10 @@ brw_draw_range_elements(struct pipe_context *pipe,
     * XXX: do we need to go through state validation to achieve this?
     * Could just call upload code directly.
     */
-   if (brw->curr.index_buffer != index_buffer) {
+   if (brw->curr.index_buffer != index_buffer ||
+       brw->curr.index_size != index_size) {
       pipe_buffer_reference( &brw->curr.index_buffer, index_buffer );
+      brw->curr.index_size = index_size;
       brw->state.dirty.mesa |= PIPE_NEW_INDEX_BUFFER;
    }