diff options
author | Mathias Fröhlich <[email protected]> | 2010-08-28 18:16:41 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-08-28 18:17:30 +0200 |
commit | c0f0eb866880ff3e701cd3a532d49417f2743283 (patch) | |
tree | d14302ee61ef5af9c82d2883261b588a298fdadf /src/gallium/drivers/r300/r300_state.c | |
parent | 97cbb563f82f9242a4d7588e502eb2d289eb1b36 (diff) |
r300g: fix min/max lod computation
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 22400113687..9adaea3235f 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1213,8 +1213,8 @@ static void* /* Unfortunately, r300-r500 don't support floating-point mipmap lods. */ /* We must pass these to the merge function to clamp them properly. */ - sampler->min_lod = MAX2((unsigned)state->min_lod, 0); - sampler->max_lod = MAX2((unsigned)ceilf(state->max_lod), 0); + sampler->min_lod = (unsigned)MAX2(state->min_lod, 0); + sampler->max_lod = (unsigned)MAX2(ceilf(state->max_lod), 0); lod_bias = CLAMP((int)(state->lod_bias * 32 + 1), -(1 << 9), (1 << 9) - 1); |