Merge branch 'mesa_7_6_branch'
[mesa.git] / src / gallium / drivers / nv10 / nv10_fragtex.c
index a4bf10828451da731a920ebb543cafa29849f5a4..27f2f8758471064b7b689be1f0241de6e3279437 100644 (file)
@@ -1,30 +1,5 @@
 #include "nv10_context.h"
-
-static INLINE int log2i(int i)
-{
-       int r = 0;
-
-       if (i & 0xffff0000) {
-               i >>= 16;
-               r += 16;
-       }
-       if (i & 0x0000ff00) {
-               i >>= 8;
-               r += 8;
-       }
-       if (i & 0x000000f0) {
-               i >>= 4;
-               r += 4;
-       }
-       if (i & 0x0000000c) {
-               i >>= 2;
-               r += 2;
-       }
-       if (i & 0x00000002) {
-               r += 1;
-       }
-       return r;
-}
+#include "nouveau/nouveau_util.h"
 
 #define _(m,tf)                                                                \
 {                                                                              \
@@ -44,9 +19,9 @@ nv10_texture_formats[] = {
        _(A8R8G8B8_UNORM, A8R8G8B8),
        _(A1R5G5B5_UNORM, A1R5G5B5),
        _(A4R4G4B4_UNORM, A4R4G4B4),
-       _(U_L8          , L8      ),
-       _(U_A8          , A8      ),
-       _(U_A8_L8       , A8L8    ),
+       _(L8_UNORM      , L8      ),
+       _(A8_UNORM      , A8      ),
+       _(A8L8_UNORM    , A8L8    ),
 //     _(RGB_DXT1      , DXT1,   ),
 //     _(RGBA_DXT1     , DXT1,   ),
 //     _(RGBA_DXT3     , DXT3,   ),
@@ -72,6 +47,7 @@ nv10_fragtex_format(uint pipe_format)
 static void
 nv10_fragtex_build(struct nv10_context *nv10, int unit)
 {
+#if 0
        struct nv10_sampler_state *ps = nv10->tex_sampler[unit];
        struct nv10_miptree *nv10mt = nv10->tex_miptree[unit];
        struct pipe_texture *pt = &nv10mt->base;
@@ -115,11 +91,13 @@ nv10_fragtex_build(struct nv10_context *nv10, int unit)
        OUT_RING  (ps->filt | 0x2000 /* magic */);
        OUT_RING  ((pt->width[0] << 16) | pt->height[0]);
        OUT_RING  (ps->bcol);
+#endif
 }
 
 void
 nv10_fragtex_bind(struct nv10_context *nv10)
 {
+#if 0
        struct nv10_fragment_program *fp = nv10->fragprog.active;
        unsigned samplers, unit;
 
@@ -141,5 +119,6 @@ nv10_fragtex_bind(struct nv10_context *nv10)
        }
 
        nv10->fp_samplers = fp->samplers;
+#endif
 }