From 22bc3cdd49eb81d48ad4b8f06be0b9a9de624c91 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 31 Aug 2007 12:51:36 +0800 Subject: [PATCH] i965: Take the upper limitation on LOD into account. --- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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 83a4b02e483..81fc9ef2f0c 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -192,8 +192,8 @@ static void brw_update_sampler_state( struct gl_texture_unit *texUnit, */ sampler->ss0.base_level = U_FIXED(0, 1); - sampler->ss1.max_lod = U_FIXED(MAX2(texObj->MaxLod, 0), 6); - sampler->ss1.min_lod = U_FIXED(MAX2(texObj->MinLod, 0), 6); + sampler->ss1.max_lod = U_FIXED(MIN2(MAX2(texObj->MaxLod, 0), 13), 6); + sampler->ss1.min_lod = U_FIXED(MIN2(MAX2(texObj->MinLod, 0), 13), 6); sampler->ss2.default_color_pointer = sdc_gs_offset >> 5; } -- 2.30.2