intel: Remove the unrelaxed relocation assertion
[mesa.git] / src / mesa / drivers / dri / mga / mgatexmem.c
index 559813f5deca11f7c04d709117b2eb9ac0957637..58afbbb279ed55abc9b45c19fcc46edb787d13bb 100644 (file)
  *    Keith Whitwell <keith@tungstengraphics.com>
  */
 
-#include "glheader.h"
+#include "main/glheader.h"
 
-#include "mm.h"
+#include "main/mm.h"
 #include "mgacontext.h"
 #include "mgatex.h"
 #include "mgaregs.h"
 #include "mgaioctl.h"
 #include "mga_xmesa.h"
 
-#include "imports.h"
-#include "simple_list.h"
+#include "main/imports.h"
+#include "main/simple_list.h"
 
 /**
  * Destroy any device-dependent state associated with the texture.  This may
@@ -137,7 +137,7 @@ static void mgaUploadSubImage( mgaContextPtr mmesa,
     * directly used by the hardware for texturing.
     */
 
-   texelBytes = texImage->TexFormat->TexelBytes;
+   texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
    length = texImage->Width * texImage->Height * texelBytes;
    if ( t->base.heap->heapId == MGA_CARD_HEAP ) {
       unsigned  tex_offset = 0;
@@ -222,6 +222,7 @@ int mgaUploadTexImages( mgaContextPtr mmesa, mgaTextureObjectPtr t )
         return -1;
       }
 
+      assert(t->base.memBlock);
       ofs = mmesa->mgaScreen->textureOffset[ heap ]
           + t->base.memBlock->ofs;