aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm_state.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-10-27 22:49:09 -0700
committerKenneth Graunke <[email protected]>2011-11-10 22:51:19 -0800
commit32dfa6e5ef3d1fb703ec34942c55408be22e7ec3 (patch)
tree00ca8ab9078b9097a8dac82076b071550cb509cf /src/mesa/drivers/dri/i965/brw_wm_state.c
parent91043c21f9b82054060311aabb617dd6e5058602 (diff)
i965: Move and rename "wm sampler" fields to just "sampler".
brw_wm_samplers actually enables any active samplers regardless of what pipeline stage is using them, so it doesn't make much sense for it to be WM-specific. So, rename it to "brw_samplers." To properly generalize it, move sampler_count and sampler_offset from brw_context::wm to a new brw_context::sampler that can be shared without looking strange. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 69d7a769e54..e1791c20ea7 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -137,13 +137,13 @@ brw_upload_wm_unit(struct brw_context *brw)
wm->wm4.sampler_count = 0; /* hardware requirement */
else {
/* CACHE_NEW_SAMPLER */
- wm->wm4.sampler_count = (brw->wm.sampler_count + 1) / 4;
+ wm->wm4.sampler_count = (brw->sampler.count + 1) / 4;
}
- if (brw->wm.sampler_count) {
+ if (brw->sampler.count) {
/* reloc */
wm->wm4.sampler_state_pointer = (intel->batch.bo->offset +
- brw->wm.sampler_offset) >> 5;
+ brw->sampler.offset) >> 5;
} else {
wm->wm4.sampler_state_pointer = 0;
}
@@ -233,11 +233,11 @@ brw_upload_wm_unit(struct brw_context *brw)
}
/* Emit sampler state relocation */
- if (brw->wm.sampler_count != 0) {
+ if (brw->sampler.count != 0) {
drm_intel_bo_emit_reloc(intel->batch.bo,
brw->wm.state_offset +
offsetof(struct brw_wm_unit_state, wm4),
- intel->batch.bo, (brw->wm.sampler_offset |
+ intel->batch.bo, (brw->sampler.offset |
wm->wm4.stats_enable |
(wm->wm4.sampler_count << 2)),
I915_GEM_DOMAIN_INSTRUCTION, 0);