i915: Use _MaxLevel on principle in texture setup.
authorEric Anholt <eric@anholt.net>
Tue, 29 Dec 2009 23:55:34 +0000 (15:55 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 4 Jan 2010 22:15:12 +0000 (14:15 -0800)
It was OK before because we proceed to clamp the value to hardware
limits, but given that other use of MaxLevel has been a trap, let's
avoid it.

src/mesa/drivers/dri/i915/i915_texstate.c

index de258484d6cbb12c26290b034b153452fe919d4c..825f1dbbe3e5e6975cc8bc35c1fc2b6c15b9d45a 100644 (file)
@@ -196,10 +196,11 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
         state[I915_TEXREG_MS3] |= MS3_TILE_WALK;
    }
 
-   /* We get one field with fraction bits to cover the maximum addressable (smallest
-    * resolution) LOD.  Use it to cover both MAX_LEVEL and MAX_LOD.
+   /* We get one field with fraction bits for the maximum addressable
+    * (lowest resolution) LOD.  Use it to cover both MAX_LEVEL and
+    * MAX_LOD.
     */
-   maxlod = MIN2(tObj->MaxLod, tObj->MaxLevel - tObj->BaseLevel);
+   maxlod = MIN2(tObj->MaxLod, tObj->_MaxLevel - tObj->BaseLevel);
    state[I915_TEXREG_MS4] =
       ((((pitch / 4) - 1) << MS4_PITCH_SHIFT) |
        MS4_CUBE_FACE_ENA_MASK |