summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-09-11 16:49:02 +0800
committerXiang, Haihao <[email protected]>2007-09-11 17:02:15 +0800
commit357893a87308111904b2f44cd254bf0638c4a11b (patch)
tree3a4326cd2ad01a484d661f0ff34720cf11e2f4eb /src/mesa/drivers
parenta17881da5f8e47a4ac3c946be14db58a84d946be (diff)
i965: limit on LOD Bias, fix#11987
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index 55c9be04de2..fa5cc8b38e8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -178,7 +178,7 @@ static void brw_update_sampler_state( struct gl_texture_unit *texUnit,
/* Set LOD bias:
*/
- sampler->ss0.lod_bias = S_FIXED(texUnit->LodBias + texObj->LodBias, 6);
+ sampler->ss0.lod_bias = S_FIXED(CLAMP(texUnit->LodBias + texObj->LodBias, -16, 15), 6);
sampler->ss0.lod_preclamp = 1; /* OpenGL mode */
sampler->ss0.default_color_mode = 0; /* OpenGL/DX10 mode */