aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_state_cache.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-06-08 13:55:53 -0700
committerEric Anholt <[email protected]>2010-06-09 14:17:52 -0700
commit503eb57a003f51c25687e9cf0ad6f7939a757f1b (patch)
tree06d6a6612177552abc34481b6ac45bdd6b3250d7 /src/mesa/drivers/dri/i965/brw_state_cache.c
parent45fb47d50c08bc4c11e4454883641501713e5710 (diff)
i965: Avoid calloc/free in the CURBE upload process.
In exchange we end up with an extra memcpy, but that seems better than calloc/free. Each buffer is 4k maximum, and on the i965-streaming branch this allocation was showing up as the top entry in brw_validate_state profiling for cairo-gl.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_state_cache.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_cache.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index 415b6456652..ea81ad13417 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -447,11 +447,6 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
cache->n_items = 0;
- if (brw->curbe.last_buf) {
- free(brw->curbe.last_buf);
- brw->curbe.last_buf = NULL;
- }
-
brw->state.dirty.mesa |= ~0;
brw->state.dirty.brw |= ~0;
brw->state.dirty.cache |= ~0;