tweak anisotropic filtering code
authorBrian <brian.paul@tungstengraphics.com>
Thu, 8 Nov 2007 17:10:35 +0000 (10:10 -0700)
committerBrian <brian.paul@tungstengraphics.com>
Thu, 8 Nov 2007 17:10:35 +0000 (10:10 -0700)
src/mesa/pipe/i915simple/i915_context.c
src/mesa/pipe/i915simple/i915_state.c

index 4a5b6bec61f23d4dd79b4cd4c448c03ee3575e14..e43274dc6674539131ef280a135c110a45aa5139 100644 (file)
@@ -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;
index bfd2f8894ed39f28d40daa3926853bfdf8ca75d4..70b8195bf1d7d56e2baa892030c265ddc7bd4501 100644 (file)
@@ -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 );