r200: Fix SetTexOffset format for 16 bit pixmaps/textures.
authorMichel Dänzer <michel@tungstengraphics.com>
Tue, 6 Nov 2007 17:22:42 +0000 (18:22 +0100)
committerMichel Dänzer <michel@tungstengraphics.com>
Tue, 6 Nov 2007 17:22:42 +0000 (18:22 +0100)
Use symbolic array indices to clarify.

src/mesa/drivers/dri/r200/r200_texstate.c

index 93c0fb7a65fb2dd2fe480c7299740bf1c4a591d1..755035b07a8ffe050319dc13918b887af47cc9a1 100644 (file)
@@ -998,17 +998,17 @@ void r200SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
 
        switch (depth) {
        case 32:
-               t->pp_txformat = tx_table_le[2].format;
-               t->pp_txfilter |= tx_table_le[2].filter;
+               t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format;
+               t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter;
                break;
        case 24:
        default:
-               t->pp_txformat = tx_table_le[4].format;
-               t->pp_txfilter |= tx_table_le[4].filter;
+               t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format;
+               t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB888].filter;
                break;
        case 16:
-               t->pp_txformat = tx_table_le[5].format;
-               t->pp_txfilter |= tx_table_le[5].filter;
+               t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565].format;
+               t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565].filter;
                break;
        }
 }