Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
[mesa.git] / src / mesa / pipe / nv40 / nv40_fragtex.c
index c87e3618317dc6c0b09244a6e867d404e14bfb16..5af5fbe74658d83b9e022f1e59e7a3ee916e4977 100644 (file)
@@ -70,8 +70,7 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
 
        txf  = ps->fmt;
        txf |= tf->format | 0x8000;
-       txf |= ((pt->last_level - pt->first_level + 1) <<
-               NV40TCL_TEX_FORMAT_MIPMAP_COUNT_SHIFT);
+       txf |= ((pt->last_level + 1) << NV40TCL_TEX_FORMAT_MIPMAP_COUNT_SHIFT);
 
        if (1) /* XXX */
                txf |= NV40TCL_TEX_FORMAT_NO_BORDER;
@@ -104,19 +103,18 @@ nv40_fragtex_build(struct nv40_context *nv40, int unit)
        txs = tf->swizzle;
 
        so = so_new(16, 2);
-       so_method(so, nv40->curie, NV40TCL_TEX_OFFSET(unit), 8);
+       so_method(so, nv40->hw->curie, NV40TCL_TEX_OFFSET(unit), 8);
        so_reloc (so, nv40mt->buffer, 0, tex_flags | NOUVEAU_BO_LOW, 0, 0);
        so_reloc (so, nv40mt->buffer, txf, tex_flags | NOUVEAU_BO_OR,
                  NV40TCL_TEX_FORMAT_DMA0, NV40TCL_TEX_FORMAT_DMA1);
        so_data  (so, ps->wrap);
-       so_data  (so, NV40TCL_TEX_ENABLE_ENABLE | ps->en |
-                  (0x00078000) /* mipmap related? */);
+       so_data  (so, NV40TCL_TEX_ENABLE_ENABLE | ps->en);
        so_data  (so, txs);
-       so_data  (so, ps->filt | 0x3fd6 /*voodoo*/);
+       so_data  (so, ps->filt | 0x2000 /*voodoo*/);
        so_data  (so, (pt->width[0] << NV40TCL_TEX_SIZE0_W_SHIFT) |
                       pt->height[0]);
        so_data  (so, ps->bcol);
-       so_method(so, nv40->curie, NV40TCL_TEX_SIZE1(unit), 1);
+       so_method(so, nv40->hw->curie, NV40TCL_TEX_SIZE1(unit), 1);
        so_data  (so, (pt->depth[0] << NV40TCL_TEX_SIZE1_DEPTH_SHIFT) | txp);
 
        so_emit(nv40->nvws, so);