Remove CVS keywords.
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_texmem.c
index 3943afcde0bdf694864316a54cfb725879bd3c3c..5f7bbe6a4cb04e38918cec063b2dfc27335f5917 100644 (file)
@@ -1,4 +1,3 @@
-/* $XFree86: xc/lib/GL/mesa/src/drv/radeon/radeon_texmem.c,v 1.7 2002/12/16 16:18:59 dawes Exp $ */
 /**************************************************************************
 
 Copyright 2000, 2001 ATI Technologies Inc., Ontario, Canada, and
@@ -37,10 +36,10 @@ SOFTWARE.
  */
 #include <errno.h> 
 
-#include "glheader.h"
-#include "imports.h"
-#include "context.h"
-#include "macros.h"
+#include "main/glheader.h"
+#include "main/imports.h"
+#include "main/context.h"
+#include "main/macros.h"
 
 #include "radeon_context.h"
 #include "radeon_ioctl.h"
@@ -67,7 +66,6 @@ radeonDestroyTexObj( radeonContextPtr rmesa, radeonTexObjPtr t )
       for ( i = 0 ; i < rmesa->glCtx->Const.MaxTextureUnits ; i++ ) {
         if ( t == rmesa->state.texture.unit[i].texobj ) {
            rmesa->state.texture.unit[i].texobj = NULL;
-           rmesa->hw.tex[i].dirty = GL_FALSE;
         }
       }
    }
@@ -226,7 +224,7 @@ static void uploadSubImage( radeonContextPtr rmesa, radeonTexObjPtr t,
    imageWidth = texImage->Width;
    imageHeight = texImage->Height;
 
-   offset = t->bufAddr;
+   offset = t->bufAddr + t->base.totalSize * face / 6;
 
    if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) {
       GLint imageX = 0;
@@ -333,7 +331,10 @@ static void uploadSubImage( radeonContextPtr rmesa, radeonTexObjPtr t,
 
 int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t, GLuint face )
 {
-   const int numLevels = t->base.lastLevel - t->base.firstLevel + 1;
+   int numLevels;
+
+   if ( !t || t->base.totalSize == 0 || t->image_override )
+      return 0;
 
    if ( RADEON_DEBUG & (DEBUG_TEXTURE|DEBUG_IOCTL) ) {
       fprintf( stderr, "%s( %p, %p ) sz=%d lvls=%d-%d\n", __FUNCTION__,
@@ -341,8 +342,7 @@ int radeonUploadTexImages( radeonContextPtr rmesa, radeonTexObjPtr t, GLuint fac
               t->base.firstLevel, t->base.lastLevel );
    }
 
-   if ( !t || t->base.totalSize == 0 )
-      return 0;
+   numLevels = t->base.lastLevel - t->base.firstLevel + 1;
 
    if (RADEON_DEBUG & DEBUG_SYNC) {
       fprintf(stderr, "%s: Syncing\n", __FUNCTION__ );