projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea414e3
)
i965: Replace a MIN(MAX()) with CLAMP().
author
Eric Anholt
<eric@anholt.net>
Thu, 29 Oct 2009 17:36:22 +0000
(10:36 -0700)
committer
Eric Anholt
<eric@anholt.net>
Thu, 29 Oct 2009 19:06:03 +0000
(12:06 -0700)
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
patch
|
blob
|
history
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 dff466587a8df8c36640bffe132f1d644ff3148f..416ffc97615e97b197a2b190f7cfef7c4abfadfa 100644
(file)
--- 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 */
}