aboutsummaryrefslogtreecommitdiffstats
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.c3
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h16
2 files changed, 9 insertions, 10 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 49072462ec3..534c1b5935f 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -556,7 +556,8 @@ static void*
sampler->filter0 |= r300_translate_tex_filters(state->min_img_filter,
state->mag_img_filter,
- state->min_mip_filter);
+ state->min_mip_filter,
+ state->max_anisotropy > 1.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 dbe42edd910..02adee27015 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -260,35 +260,33 @@ static INLINE uint32_t r300_translate_wrap(int wrap)
static INLINE uint32_t r300_translate_tex_filters(int min, int mag, int mip)
{
uint32_t retval = 0;
- switch (min) {
+ if (is_anisotropic)
+ retval |= R300_TX_MIN_FILTER_ANISO | R300_TX_MAG_FILTER_ANISO;
+ else {
+ switch (min) {
case PIPE_TEX_FILTER_NEAREST:
retval |= R300_TX_MIN_FILTER_NEAREST;
break;
case PIPE_TEX_FILTER_LINEAR:
retval |= R300_TX_MIN_FILTER_LINEAR;
break;
- case PIPE_TEX_FILTER_ANISO:
- retval |= R300_TX_MIN_FILTER_ANISO;
- break;
default:
debug_printf("r300: Unknown texture filter %d\n", min);
assert(0);
break;
- }
- switch (mag) {
+ }
+ switch (mag) {
case PIPE_TEX_FILTER_NEAREST:
retval |= R300_TX_MAG_FILTER_NEAREST;
break;
case PIPE_TEX_FILTER_LINEAR:
retval |= R300_TX_MAG_FILTER_LINEAR;
break;
- case PIPE_TEX_FILTER_ANISO:
- retval |= R300_TX_MAG_FILTER_ANISO;
- break;
default:
debug_printf("r300: Unknown texture filter %d\n", mag);
assert(0);
break;
+ }
}
switch (mip) {
case PIPE_TEX_MIPFILTER_NONE: