diff options
author | Eric Anholt <[email protected]> | 2009-10-29 10:36:22 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-10-29 12:06:03 -0700 |
commit | 374447244165b3b79892cb6840a76ea4c2f21f1e (patch) | |
tree | dfd8fe87667586c31fa3986016228d6dc4103ff0 /src | |
parent | ea414e331802e49d59eb2ddd2466d58a383bc931 (diff) |
i965: Replace a MIN(MAX()) with CLAMP().
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 4 |
1 files 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 dff466587a8..416ffc97615 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -228,8 +228,8 @@ static void brw_update_sampler_state(struct wm_sampler_entry *key, */ sampler->ss0.base_level = U_FIXED(0, 1); - sampler->ss1.max_lod = U_FIXED(MIN2(MAX2(key->maxlod, 0), 13), 6); - sampler->ss1.min_lod = U_FIXED(MIN2(MAX2(key->minlod, 0), 13), 6); + sampler->ss1.max_lod = U_FIXED(CLAMP(key->maxlod, 0, 13), 6); + sampler->ss1.min_lod = U_FIXED(CLAMP(key->minlod, 0, 13), 6); sampler->ss2.default_color_pointer = sdc_bo->offset >> 5; /* reloc */ } |