summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-08-08 13:58:48 -0700
committerEric Anholt <eric@anholt.net>2008-08-08 14:00:43 -0700
commitd2796939f18815935c8fe1effb01fa9765d6c7d8 (patch)
tree207b657f757db711640029fe2e27ee657cbc04d0 /src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
parent527e1cf172cb0a4d1f2891a351498669be1620cd (diff)
intel-gem: Update to new check_aperture API for classic mode.
To do this, I had to clean up some of 965 state upload stuff. We may end up over-emitting state in the aperture overflow case, but that should be rare, and I'd rather have the simplification of state management.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_sampler_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index 461f977aac..08d01823de 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -255,11 +255,10 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
* complicates various things. However, this is still too confusing -
* FIXME: simplify all the different new texture state flags.
*/
-static int upload_wm_samplers( struct brw_context *brw )
+static void upload_wm_samplers( struct brw_context *brw )
{
struct wm_sampler_key key;
int i;
- int ret = 0;
brw_wm_sampler_populate_key(brw, &key);
@@ -271,7 +270,7 @@ static int upload_wm_samplers( struct brw_context *brw )
dri_bo_unreference(brw->wm.sampler_bo);
brw->wm.sampler_bo = NULL;
if (brw->wm.sampler_count == 0)
- return 0;
+ return;
brw->wm.sampler_bo = brw_search_cache(&brw->cache, BRW_SAMPLER,
&key, sizeof(key),
@@ -304,7 +303,6 @@ static int upload_wm_samplers( struct brw_context *brw )
if (!brw->attribs.Texture->Unit[i]._ReallyEnabled)
continue;
- ret |= dri_bufmgr_check_aperture_space(brw->wm.sdc_bo[i]);
intel_bo_emit_reloc(brw->wm.sampler_bo,
I915_GEM_DOMAIN_INSTRUCTION, 0,
0,
@@ -313,10 +311,6 @@ static int upload_wm_samplers( struct brw_context *brw )
brw->wm.sdc_bo[i]);
}
}
-
- ret |= dri_bufmgr_check_aperture_space(brw->wm.sampler_bo);
- return ret;
-
}
const struct brw_tracked_state brw_wm_samplers = {