summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/mga/mga_texstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/mga/mga_texstate.c')
-rw-r--r--src/mesa/drivers/dri/mga/mga_texstate.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c
index ad765d1dd7..54eda62a96 100644
--- a/src/mesa/drivers/dri/mga/mga_texstate.c
+++ b/src/mesa/drivers/dri/mga/mga_texstate.c
@@ -27,22 +27,19 @@
* Keith Whitwell <keithw@tungstengraphics.com>
*/
-#include <stdlib.h>
+#include "main/context.h"
+#include "main/enums.h"
+#include "main/macros.h"
#include "main/mm.h"
+#include "main/imports.h"
+#include "main/simple_list.h"
+
#include "mgacontext.h"
#include "mgatex.h"
#include "mgaregs.h"
#include "mgatris.h"
#include "mgaioctl.h"
-#include "main/context.h"
-#include "main/enums.h"
-#include "main/macros.h"
-#include "main/imports.h"
-
-#include "main/simple_list.h"
-#include "main/texformat.h"
-
#define MGA_USE_TABLE_FOR_FORMAT
#ifdef MGA_USE_TABLE_FOR_FORMAT
#define TMC_nr_tformat (MESA_FORMAT_YCBCR_REV + 1)
@@ -94,14 +91,14 @@ mgaSetTexImages( mgaContextPtr mmesa,
return;
}
#else
- if ( (baseImage->TexFormat->MesaFormat >= TMC_nr_tformat)
- || (TMC_tformat[ baseImage->TexFormat->MesaFormat ] == 0) )
+ if ( (baseImage->TexFormat >= TMC_nr_tformat)
+ || (TMC_tformat[ baseImage->TexFormat ] == 0) )
{
_mesa_problem(NULL, "unexpected texture format in %s", __FUNCTION__);
return;
}
- txformat = TMC_tformat[ baseImage->TexFormat->MesaFormat ];
+ txformat = TMC_tformat[ baseImage->TexFormat ];
#endif /* MGA_USE_TABLE_FOR_FORMAT */
@@ -131,7 +128,7 @@ mgaSetTexImages( mgaContextPtr mmesa,
break;
size = texImage->Width * texImage->Height *
- baseImage->TexFormat->TexelBytes;
+ _mesa_get_format_bytes(baseImage->TexFormat);
t->offsets[i] = totalSize;
t->base.dirty_images[0] |= (1<<i);