summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-12 17:07:27 -0700
committerBen Skeggs <skeggsb@gmail.com>2008-02-15 13:51:12 +1100
commitb487e4b4fb3d9304feedf910a2f137703a0e260b (patch)
tree48d05c96bcb2b886835d3edf4c0d3ef98a86f2fd
parent2ef9df660c0ee06aa0ea13663d0706cc03fecbb7 (diff)
gallium: clamp min_lod so it's never negative
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 6241e70b55..92263cb688 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -147,7 +147,7 @@ update_samplers(struct st_context *st)
sampler.lod_bias = st->ctx->Texture.Unit[su].LodBias;
#if 1
- sampler.min_lod = texobj->MinLod;
+ sampler.min_lod = (texobj->MinLod) < 0.0 ? 0.0 : texobj->MinLod;
sampler.max_lod = texobj->MaxLod;
#else
/* min/max lod should really be as follows (untested).