diff options
author | Eric Anholt <[email protected]> | 2008-01-11 16:00:50 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-01-14 10:18:38 -0800 |
commit | 7fec1eb21ba2121f530cb5412f658303b683e1d3 (patch) | |
tree | 031633cf1e082d61685df5a12789cd95933ec1a7 /src | |
parent | 544ab209e75ec3646d7edbafd736dcf4c93738cc (diff) |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vtbl.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index c74aff785ea..63547f386d3 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -325,7 +325,7 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx, brw->no_batch_wrap = GL_FALSE; - /* Free any old data so it doesn't clog up texture memory - we + /* Free any completed data so it doesn't clog up texture memory - we * won't be referencing it again. */ while (brw->vb.upload.wrap != brw->vb.upload.buf) { diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c index 126e6558395..0b70888071d 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, |