summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-03-24 12:51:50 -0600
committerBrian <[email protected]>2008-03-24 12:51:50 -0600
commitd83e75c75958673e8019475f5ba5c2cff9b8415f (patch)
tree025e501080e3b628620c2f8748f7bfb11edef72d /src/gallium/auxiliary/util
parent4e398df6825f4b6d568f055b689e7d7043e2785e (diff)
gallium: move filter assignment out of loop
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 427b2177550..e129c062be6 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -890,6 +890,10 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
memset(&fb, 0, sizeof(fb));
fb.num_cbufs = 1;
+ /* set min/mag to same filter for faster sw speed */
+ ctx->sampler.mag_img_filter = filter;
+ ctx->sampler.min_img_filter = filter;
+
/*
* XXX for small mipmap levels, it may be faster to use the software
* fallback path...
@@ -914,8 +918,6 @@ util_gen_mipmap(struct gen_mipmap_state *ctx,
*/
ctx->sampler.min_lod = ctx->sampler.max_lod = (float) srcLevel;
ctx->sampler.lod_bias = (float) srcLevel;
- ctx->sampler.mag_img_filter = filter;
- ctx->sampler.min_img_filter = filter;
cso_single_sampler(ctx->cso, 0, &ctx->sampler);
cso_single_sampler_done(ctx->cso);
#if 0