summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_state.c2
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index a6a4f99d73..8d68aa230b 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -777,7 +777,7 @@ static void*
sampler->filter0 |= r300_translate_tex_filters(state->min_img_filter,
state->mag_img_filter,
state->min_mip_filter,
- state->max_anisotropy > 1.0);
+ state->max_anisotropy > 0);
/* Unfortunately, r300-r500 don't support floating-point mipmap lods. */
/* We must pass these to the emit function to clamp them properly. */
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 5df6815221..779ba2c7be 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -312,15 +312,15 @@ static INLINE uint32_t r300_translate_tex_filters(int min, int mag, int mip,
return retval;
}
-static INLINE uint32_t r300_anisotropy(float max_aniso)
+static INLINE uint32_t r300_anisotropy(unsigned max_aniso)
{
- if (max_aniso >= 16.0f) {
+ if (max_aniso >= 16) {
return R300_TX_MAX_ANISO_16_TO_1;
- } else if (max_aniso >= 8.0f) {
+ } else if (max_aniso >= 8) {
return R300_TX_MAX_ANISO_8_TO_1;
- } else if (max_aniso >= 4.0f) {
+ } else if (max_aniso >= 4) {
return R300_TX_MAX_ANISO_4_TO_1;
- } else if (max_aniso >= 2.0f) {
+ } else if (max_aniso >= 2) {
return R300_TX_MAX_ANISO_2_TO_1;
} else {
return R300_TX_MAX_ANISO_1_TO_1;