summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-03-15 10:31:20 -0600
committerBrian Paul <brianp@vmware.com>2010-03-15 10:31:20 -0600
commite0f7c3cbf09c4425852d805a91991ca6ce8a0ad6 (patch)
tree6c8777052b5e374b1803f712c174bb4e2a9a3325
parentf9d753787e6c566d3481cca07dee939239eb7071 (diff)
gallivm: fix incorrect clamp in lp_build_linear_mip_levels()
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index 72018737a8..19d78424bc 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -986,7 +986,7 @@ lp_build_linear_mip_levels(struct lp_build_sample_context *bld,
last_level);
/* compute level 1 and clamp to legal range of levels */
*level1_out = lp_build_add(int_bld, *level0_out, int_bld->one);
- *level1_out = lp_build_min(int_bld, *level1_out, int_bld->zero);
+ *level1_out = lp_build_min(int_bld, *level1_out, last_level);
*weight_out = lp_build_fract(float_bld, lod);
}