From 7fec1eb21ba2121f530cb5412f658303b683e1d3 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 11 Jan 2008 16:00:50 -0800 Subject: [965] Force a new vertex upload buffer at new batch time. Otherwise, we could choose to upload into the temporary VBO that we just fired off to the hardware. Good for a 60% OA performance improvement. --- src/mesa/drivers/dri/i965/brw_vtbl.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/drivers/dri/i965/brw_vtbl.c') diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 126e655839..0b70888071 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -106,6 +106,11 @@ static void brw_new_batch( struct intel_context *intel ) brw->state.dirty.mesa |= ~0; brw->state.dirty.brw |= ~0; brw->state.dirty.cache |= ~0; + + /* Move to the end of the current upload buffer so that we'll force choosing + * a new buffer next time. + */ + brw->vb.upload.offset = brw->vb.upload.vbo[brw->vb.upload.buf]->Size; } static void brw_note_fence( struct intel_context *intel, -- cgit v1.2.3