From 2abcc512a3ce81bc11ff2b45a2208d3400a2385d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sat, 2 Feb 2008 23:27:19 -0800 Subject: [965] Convert brw_draw_upload to managing dri_bos, not gl_buffer_objects. This helps us avoid a bunch of mess with gl_client_arrays that we filled with unused data and confused readers. --- src/mesa/drivers/dri/i965/brw_vtbl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 0b70888071..cdbbe7b699 100644 --- a/src/mesa/drivers/dri/i965/brw_vtbl.c +++ b/src/mesa/drivers/dri/i965/brw_vtbl.c @@ -110,7 +110,11 @@ static void brw_new_batch( struct intel_context *intel ) /* 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; + if (brw->vb.upload.bo != NULL) { + dri_bo_unreference(brw->vb.upload.bo); + brw->vb.upload.bo = NULL; + brw->vb.upload.offset = 0; + } } static void brw_note_fence( struct intel_context *intel, -- cgit v1.2.3