summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/i965/brw_draw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/i965/brw_draw.c b/src/gallium/drivers/i965/brw_draw.c
index 88cb31ad546..84803e43bef 100644
--- a/src/gallium/drivers/i965/brw_draw.c
+++ b/src/gallium/drivers/i965/brw_draw.c
@@ -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;
}