diff options
author | Xiang, Haihao <[email protected]> | 2007-09-11 16:49:02 +0800 |
---|---|---|
committer | Xiang, Haihao <[email protected]> | 2007-09-11 16:49:02 +0800 |
commit | 241b7bc0a3e6277e15bb45887ad5533ffe692428 (patch) | |
tree | fbfb42dda2fe35059e43dac0b95bee7c5694c1db /src/mesa/drivers/dri/i965 | |
parent | 24cd84162e97914fb19190593f59eb7c074f333c (diff) |
i965: limit on LOD Bias, fix#11987
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 |
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 */ |