From: Eric Anholt Date: Fri, 22 Jul 2011 17:56:10 +0000 (-0700) Subject: i965: Fix many of the trivial WebGL demos that broke due to IB optimization. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=818db3848bfaa002d0e7cf6b9b615a31eb82ba25;p=mesa.git 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. --- diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 55dbd4fa8b0..40360b23fff 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -213,6 +213,7 @@ static void brw_new_batch( struct intel_context *intel ) brw->state_batch_count = 0; 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