summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_vtbl.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-02-05 07:08:51 -0800
committerEric Anholt <eric@anholt.net>2010-02-06 14:10:07 +0100
commitc8433af711c1ec102bfaded742be964545464a42 (patch)
treed83da37120621b59fed1684dce60f517c2a9fe25 /src/mesa/drivers/dri/i965/brw_vtbl.c
parent3e498207d1a0e95f143bb04b38ca22faf5f91f5d (diff)
i965: Keep the CURBE BO mapped and memcpy instead of subdataing.
For the tiny bis of data we generally upload through the CURBEs, the overhead of the kernel's pagetable trickery is actually rather high. This improves cairo-gl gnome-terminal-vim performance by 3.8%.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vtbl.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index e08f32c4e2..681319dedf 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -139,6 +139,12 @@ static void brw_finish_batch(struct intel_context *intel)
{
struct brw_context *brw = brw_context(&intel->ctx);
brw_emit_query_end(brw);
+
+ if (brw->curbe.curbe_bo) {
+ intel_bo_unmap_gtt_preferred(intel, brw->curbe.curbe_bo);
+ drm_intel_bo_unreference(brw->curbe.curbe_bo);
+ brw->curbe.curbe_bo = NULL;
+ }
}
@@ -149,8 +155,6 @@ static void brw_new_batch( struct intel_context *intel )
{
struct brw_context *brw = brw_context(&intel->ctx);
- brw->curbe.need_new_bo = GL_TRUE;
-
/* Mark all context state as needing to be re-emitted.
* This is probably not as severe as on 915, since almost all of our state
* is just in referenced buffers.