mesa: replace gl_texture_format with gl_format
[mesa.git] / src / mesa / drivers / dri / mach64 / mach64_texstate.c
index 80c84d67746d9dde6ee690f60c20e75b87aca4cf..c333355324a6e3924c910a8f8614a5b97e1f967f 100644 (file)
  *     José Fonseca <j_r_fonseca@yahoo.co.uk>
  */
 
-#include "glheader.h"
-#include "imports.h"
-#include "context.h"
-#include "macros.h"
-#include "texformat.h"
+#include "main/glheader.h"
+#include "main/imports.h"
+#include "main/context.h"
+#include "main/macros.h"
+#include "main/texformat.h"
 
 #include "mach64_context.h"
 #include "mach64_ioctl.h"
@@ -55,7 +55,7 @@ static void mach64SetTexImages( mach64ContextPtr mmesa,
    if ( MACH64_DEBUG & DEBUG_VERBOSE_API )
       fprintf( stderr, "%s( %p )\n", __FUNCTION__, tObj );
 
-   switch (baseImage->TexFormat->MesaFormat) {
+   switch (baseImage->TexFormat) {
    case MESA_FORMAT_ARGB8888:
       t->textureFormat = MACH64_DATATYPE_ARGB8888;
       break;
@@ -89,7 +89,7 @@ static void mach64SetTexImages( mach64ContextPtr mmesa,
 
    totalSize = ( baseImage->Height *
                 baseImage->Width *
-                baseImage->TexFormat->TexelBytes );
+                _mesa_get_format_bytes(baseImage->TexFormat) );
 
    totalSize = (totalSize + 31) & ~31;