summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2009-04-23 21:55:25 +0200
committerRoland Scheidegger <[email protected]>2009-04-23 23:10:51 +0200
commitae69a046505d8c94cd3a59a9376310a904c35b3c (patch)
tree8309103b69c31aa6f5b4ca586e86deaeedaa1de3
parent8374379572d1c541a804990bc926108360f67c02 (diff)
i915: fix fix for anisotropic filtering
forgot to commit the changes to actually support 4x aniso filtering...
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 43f65392b56..a37dd7f4fb5 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -132,7 +132,7 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
struct intel_texture_object *intelObj = intel_texture_object(tObj);
struct gl_texture_image *firstImage;
GLuint *state = i915->state.Tex[unit], format, pitch;
- GLint lodbias;
+ GLint lodbias, aniso = 0;
GLubyte border[4];
memset(state, 0, sizeof(state));
@@ -230,6 +230,10 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
if (tObj->MaxAnisotropy > 1.0) {
minFilt = FILTER_ANISOTROPIC;
magFilt = FILTER_ANISOTROPIC;
+ if (tObj->MaxAnisotropy > 2.0)
+ aniso = SS2_MAX_ANISO_4;
+ else
+ aniso = SS2_MAX_ANISO_2;
}
else {
switch (tObj->MagFilter) {
@@ -275,7 +279,8 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
state[I915_TEXREG_SS2] |= ((minFilt << SS2_MIN_FILTER_SHIFT) |
(mipFilt << SS2_MIP_FILTER_SHIFT) |
- (magFilt << SS2_MAG_FILTER_SHIFT));
+ (magFilt << SS2_MAG_FILTER_SHIFT) |
+ aniso);
}
{