From 89b7b187dda26f7c7cc5e80360d49fa32f89b6fd Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 8 Nov 2007 10:10:35 -0700 Subject: tweak anisotropic filtering code --- src/mesa/pipe/i915simple/i915_context.c | 2 +- src/mesa/pipe/i915simple/i915_state.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mesa/pipe/i915simple') diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c index 4a5b6bec61..e43274dc66 100644 --- a/src/mesa/pipe/i915simple/i915_context.c +++ b/src/mesa/pipe/i915simple/i915_context.c @@ -158,7 +158,7 @@ i915_get_paramf(struct pipe_context *pipe, int param) return 255.0; case PIPE_CAP_MAX_TEXTURE_ANISOTROPY: - return 0.0; + return 4.0; case PIPE_CAP_MAX_TEXTURE_LOD_BIAS: return 16.0; diff --git a/src/mesa/pipe/i915simple/i915_state.c b/src/mesa/pipe/i915simple/i915_state.c index bfd2f8894e..70b8195bf1 100644 --- a/src/mesa/pipe/i915simple/i915_state.c +++ b/src/mesa/pipe/i915simple/i915_state.c @@ -212,6 +212,9 @@ i915_create_sampler_state(struct pipe_context *pipe, if (sampler->max_anisotropy > 1.0) { minFilt = FILTER_ANISOTROPIC; magFilt = FILTER_ANISOTROPIC; + if (sampler->max_anisotropy > 2.0) { + cso->state[0] |= SS2_MAX_ANISO_4; + } } else { minFilt = translate_img_filter( sampler->min_img_filter ); -- cgit v1.2.3