summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_sampler.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-05-01 17:31:39 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2008-05-01 17:39:33 +0100
commitde7277f81a0f4330f11ec429bf46e93d0a748dfe (patch)
tree2fa1d3b38cdb86fc4ef8428ef9b551425c7d5514 /src/mesa/state_tracker/st_atom_sampler.c
parentf1f52a8be98efa26c7c9bc480a2483fc2106d654 (diff)
gallium: Set sampler->min_lod instead of always reallocating pipe_textures.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index e1ddb53b80..0237da3693 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -37,6 +37,7 @@
#include "st_program.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
+#include "pipe/p_util.h"
#include "cso_cache/cso_context.h"
@@ -147,17 +148,8 @@ update_samplers(struct st_context *st)
sampler->normalized_coords = 1;
sampler->lod_bias = st->ctx->Texture.Unit[su].LodBias;
-#if 1
- 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).
- * 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->border_color[0] = texobj->BorderColor[RCOMP];
sampler->border_color[1] = texobj->BorderColor[GCOMP];