nv40: use a more "normal" 2x8bit format, the other is likely a HILO format.
authorBen Skeggs <skeggsb@gmail.com>
Sun, 6 Jan 2008 17:36:22 +0000 (04:36 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Sun, 6 Jan 2008 17:36:22 +0000 (04:36 +1100)
src/mesa/pipe/nv40/nv40_state_tex.c

index 7c353c1..f54a65c 100644 (file)
@@ -13,6 +13,7 @@
 
 #define NV40TCL_TEX_FORMAT_FORMAT_Z16 0x1200
 #define NV40TCL_TEX_FORMAT_FORMAT_Z24 0x1000
+#define NV40TCL_TEX_FORMAT_FORMAT_A8L8_2 0x0b00
 
 struct nv40_texture_format {
        boolean defined;
@@ -30,7 +31,7 @@ nv40_texture_formats[] = {
        _(U_L8          , L8      ,   S1,   S1,   S1,  ONE, X, X, X, X),
        _(U_A8          , L8      , ZERO, ZERO, ZERO,   S1, X, X, X, X),
        _(U_I8          , L8      ,   S1,   S1,   S1,   S1, X, X, X, X),
-       _(U_A8_L8       , A8L8    ,   S1,   S1,   S1,   S1, Z, W, X, Y),
+       _(U_A8_L8       , A8L8_2  ,   S1,   S1,   S1,   S1, X, X, X, Y),
        _(Z16_UNORM     , Z16     ,   S1,   S1,   S1,  ONE, X, X, X, X),
        _(Z24S8_UNORM   , Z24     ,   S1,   S1,   S1,  ONE, X, X, X, X),
 //     _(RGB_DXT1      , 0x86,   S1,   S1,   S1,  ONE, X, Y, Z, W, 0x00, 0x00),
@@ -105,8 +106,6 @@ nv40_tex_unit_enable(struct nv40_context *nv40, int unit)
        }
 
        txs = tf->swizzle;
-       if (pt->format == PIPE_FORMAT_U_A8_L8)
-               txs |= (1<<16); /*nfi*/
 
        nv40->tex[unit].buffer = nv40mt->buffer;
        nv40->tex[unit].format = txf;