summaryrefslogtreecommitdiff
path: root/xc/lib/GL/mesa/src/drv/mga/mgatex.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib/GL/mesa/src/drv/mga/mgatex.c')
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgatex.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatex.c b/xc/lib/GL/mesa/src/drv/mga/mgatex.c
index 5039750de..30bc9b7fb 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgatex.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgatex.c
@@ -625,24 +625,14 @@ static void mgaDDTexSubImage( GLcontext *ctx, GLenum target,
mgaTextureObjectPtr t;
t = (mgaTextureObjectPtr) tObj->DriverData;
-
-
- /* just free the mga texture if it exists, it will be recreated at
- mgaUpdateTextureState time. */
- t = (mgaTextureObjectPtr) tObj->DriverData;
- if ( t ) {
+ if (t) {
if (t->bound) FLUSH_BATCH(mmesa);
- /* if this is the current object, it will force an update */
- mgaDestroyTexObj( mmesa, t );
- mmesa->new_state |= MGA_NEW_TEXTURE;
+ LOCK_HARDWARE( mmesa );
+ /* the texture currently exists, so directly update it */
+ mgaUploadSubImageLocked( mmesa, t, level,
+ xoffset, yoffset, width, height );
+ UNLOCK_HARDWARE( mmesa );
}
-
-
-
-#if 0
- /* the texture currently exists, so directly update it */
- mgaUploadSubImage( t, level, xoffset, yoffset, width, height );
-#endif
}