summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_vtbl.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-02-02 23:27:19 -0800
committerEric Anholt <eric@anholt.net>2008-02-04 18:24:16 -0800
commit2abcc512a3ce81bc11ff2b45a2208d3400a2385d (patch)
treeedd469e42dc373dcbc865d3cf59a56ae84ff0eec /src/mesa/drivers/dri/i965/brw_vtbl.c
parent0907c639c8509cda4507b28c1399813a09a81c5e (diff)
[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.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vtbl.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c6
1 files changed, 5 insertions, 1 deletions
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,