From 32dfa6e5ef3d1fb703ec34942c55408be22e7ec3 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 27 Oct 2011 22:49:09 -0700 Subject: 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 Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/gen7_sampler_state.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa/drivers/dri/i965/gen7_sampler_state.c') diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c index 9b52e8dfd39..d2699a15911 100644 --- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c @@ -190,21 +190,21 @@ gen7_upload_samplers(struct brw_context *brw) struct gen7_sampler_state *samplers; int i; - brw->wm.sampler_count = 0; + brw->sampler.count = 0; for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { if (ctx->Texture.Unit[i]._ReallyEnabled) - brw->wm.sampler_count = i + 1; + brw->sampler.count = i + 1; } - if (brw->wm.sampler_count == 0) + if (brw->sampler.count == 0) return; samplers = brw_state_batch(brw, AUB_TRACE_SAMPLER_STATE, - brw->wm.sampler_count * sizeof(*samplers), - 32, &brw->wm.sampler_offset); - memset(samplers, 0, brw->wm.sampler_count * sizeof(*samplers)); + brw->sampler.count * sizeof(*samplers), + 32, &brw->sampler.offset); + memset(samplers, 0, brw->sampler.count * sizeof(*samplers)); - for (i = 0; i < brw->wm.sampler_count; i++) { + for (i = 0; i < brw->sampler.count; i++) { if (ctx->Texture.Unit[i]._ReallyEnabled) gen7_update_sampler_state(brw, i, &samplers[i]); } -- cgit v1.2.3