summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-01 18:10:53 -0600
committerBrian <[email protected]>2007-10-01 18:10:53 -0600
commitcdf99a9fad0fcb080244faa7d32b33b1cfaf6ff7 (patch)
tree5467fe2cc52aa3bdc43ed41c762b4655f74cf0eb /src/mesa/state_tracker
parent4c19f95a3997be7ca27c314952478790a63aeeb7 (diff)
comments/code for min/max_lod - revisit someday
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 23ccd55a057..151d7248630 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -137,8 +137,18 @@ update_samplers(struct st_context *st)
sampler.mag_img_filter = gl_filter_to_img_filter(texobj->MagFilter);
sampler.lod_bias = st->ctx->Texture.Unit[u].LodBias;
+#if 1
sampler.min_lod = texobj->MinLod;
sampler.max_lod = texobj->MaxLod;
+#else
+ /* min/max lod should really be as follows (untested).
+ * Also, calculate_first_last_level() needs to be overhauled
+ * since today's hardware had real support for LOD clamping.
+ */
+ sampler.min_lod = MAX2(texobj->BaseLevel, texobj->MinLod);
+ sampler.max_lod = MIN2(texobj->MaxLevel, texobj->MaxLod);
+#endif
+
sampler.max_anisotropy = texobj->MaxAnisotropy;
/* XXX more sampler state here */