Mesa (7.11): i965: Fix many of the trivial WebGL demos that broke due to IB optimization.

Ian Romanick idr at kemper.freedesktop.org
Thu Jul 28 18:48:48 UTC 2011


Module: Mesa
Branch: 7.11
Commit: 5238303790d16901fd7dad9854ac699114bf307d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5238303790d16901fd7dad9854ac699114bf307d

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jul 22 10:56:10 2011 -0700

i965: Fix many of the trivial WebGL demos that broke due to IB optimization.

The index buffer state emit only occurred if there was an IB in place
and we were in either a new batch or a new IB state.  But because we
only flagged new IB state if IB state changed from the last IB state
we calculated, we could simply never emit IB state after batchbuffer
wraps if the first draw didn't use the IB and we didn't actually
change the IB.

Fixes piglit glx-multi-context-ib-1.
(cherry picked from commit 818db3848bfaa002d0e7cf6b9b615a31eb82ba25)

---

 src/mesa/drivers/dri/i965/brw_vtbl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 2b288e7..ca3c221 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -211,6 +211,7 @@ static void brw_new_batch( struct intel_context *intel )
    intel->batch.need_workaround_flush = true;
 
    brw->vb.nr_current_buffers = 0;
+   brw->ib.type = -1;
 
    /* Mark that the current program cache BO has been used by the GPU.
     * It will be reallocated if we need to put new programs in for the




More information about the mesa-commit mailing list