summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-09-11 16:49:02 +0800
committerXiang, Haihao <[email protected]>2007-09-11 16:49:02 +0800
commit241b7bc0a3e6277e15bb45887ad5533ffe692428 (patch)
treefbfb42dda2fe35059e43dac0b95bee7c5694c1db
parent24cd84162e97914fb19190593f59eb7c074f333c (diff)
i965: limit on LOD Bias, fix#11987
-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 81fc9ef2f0c..8afefdd4353 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 */