summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i915/i915_vtbl.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-25 15:41:37 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-21 13:04:46 +0000
commit2c6793fb6bc89df16c23f727bcb072a157ab8d10 (patch)
treeef6ab3dfa931a84b8ab84259d45346c2a1dee622 /src/mesa/drivers/dri/i915/i915_vtbl.c
parent298ebb78de8a6b6edf0aa0fe8d784d00bbc2930e (diff)
i915: Emit a single relocation per vbo
Reducing the number of relocations has lots of nice knock-on effects, not least including reducing batch buffer size, auxilliary array sizes (vmalloced and copied into the kernel), processing of uncached relocations etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_vtbl.c')
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 4049c37fdb..921183b81d 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -678,6 +678,9 @@ i915_new_batch(struct intel_context *intel)
i915->state.emitted = 0;
i915->last_draw_offset = 0;
i915->last_sampler = 0;
+
+ i915->current_vb_bo = NULL;
+ i915->current_vertex_size = 0;
}
static void