summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv30
diff options
context:
space:
mode:
authorPatrice Mandin <pmandin@caramail.com>2008-08-14 17:24:06 +0200
committerPatrice Mandin <pmandin@caramail.com>2008-08-14 17:24:06 +0200
commitd4c199d05691878bbc4c72a06d3042ef00ff38e0 (patch)
tree4f681e681b9a05dba300dae8ffb3314a7c3ea35b /src/gallium/drivers/nv30
parenta145c107c12715105e14bb56b245eeb660cf433a (diff)
nv30: set mipmap min/max lod accordingly
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r--src/gallium/drivers/nv30/nv30_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv30/nv30_state.c b/src/gallium/drivers/nv30/nv30_state.c
index 77b0c9e08b..eceb535315 100644
--- a/src/gallium/drivers/nv30/nv30_state.c
+++ b/src/gallium/drivers/nv30/nv30_state.c
@@ -199,10 +199,10 @@ nv30_sampler_state_create(struct pipe_context *pipe,
ps->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff;
limit = CLAMP(cso->max_lod, 0.0, 15.0);
- ps->en |= (int)(limit * 256.0) << 7;
+ ps->en |= (int)(limit) << 14 /*NV34TCL_TX_ENABLE_MIPMAP_MAX_LOD_SHIFT*/;
limit = CLAMP(cso->min_lod, 0.0, 15.0);
- ps->en |= (int)(limit * 256.0) << 19;
+ ps->en |= (int)(limit) << 26 /*NV34TCL_TX_ENABLE_MIPMAP_MIN_LOD_SHIFT*/;
}
if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) {