summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_sampler_state.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2011-04-22 15:30:42 -0700
committerEric Anholt <eric@anholt.net>2011-04-29 15:26:14 -0700
commit5c742ea1ee0cea031cb99651155d0c7521f42b4e (patch)
tree6d78835b77d83c17919644ed81fd3fb19636af2e /src/mesa/drivers/dri/i965/gen6_sampler_state.c
parent1a447749ed421db8eb6ba20012630785aef9bb12 (diff)
downloadexternal_mesa3d-5c742ea1ee0cea031cb99651155d0c7521f42b4e.zip
external_mesa3d-5c742ea1ee0cea031cb99651155d0c7521f42b4e.tar.gz
external_mesa3d-5c742ea1ee0cea031cb99651155d0c7521f42b4e.tar.bz2
i965: Move sampler state to state streaming.
Overall, across this series since the last set of numbers, gen6 3DMMES taiji performance has dropped 0.8% +/- 0.3% (n=15), probably due to the increased reissuing of state from some of the state objects that otherwise never changed, and increased occurrence of the per-batch overhead as we've increased how much we put in the batch BO without increasing the batch BO's size. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_sampler_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sampler_state.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_sampler_state.c b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
index f65c651..969780a 100644
--- a/src/mesa/drivers/dri/i965/gen6_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
@@ -43,27 +43,20 @@ upload_sampler_state_pointers(struct brw_context *brw)
(4 - 2));
OUT_BATCH(0); /* VS */
OUT_BATCH(0); /* GS */
- if (brw->wm.sampler_bo)
- OUT_RELOC(brw->wm.sampler_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+ if (brw->wm.sampler_count)
+ OUT_RELOC(intel->batch.bo, I915_GEM_DOMAIN_INSTRUCTION, 0,
+ brw->wm.sampler_offset);
else
OUT_BATCH(0);
ADVANCE_BATCH();
}
-
-static void
-prepare_sampler_state_pointers(struct brw_context *brw)
-{
- brw_add_validated_bo(brw, brw->wm.sampler_bo);
-}
-
const struct brw_tracked_state gen6_sampler_state = {
.dirty = {
.mesa = 0,
.brw = BRW_NEW_BATCH,
.cache = CACHE_NEW_SAMPLER
},
- .prepare = prepare_sampler_state_pointers,
.emit = upload_sampler_state_pointers,
};