Mesa (i965g-restart): i965g: propogate index size state

Keith Whitwell keithw at kemper.freedesktop.org
Fri Nov 6 07:31:48 PST 2009


Module: Mesa
Branch: i965g-restart
Commit: 4d1ae7a546250548332e432f305ce47bd97967c3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4d1ae7a546250548332e432f305ce47bd97967c3

Author: Keith Whitwell <keithw at vmware.com>
Date:   Fri Nov  6 14:18:28 2009 +0000

i965g: propogate index size state

---

 src/gallium/drivers/i965/brw_draw.c |    4 +++-
 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 88cb31a..84803e4 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;
    }
 



More information about the mesa-commit mailing list