tdfxDDWriteDepthPixels can be called with mask == NULL.
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_context.c
index 826a9f71dfe278abbb5fb59a2e780a889b85456d..5ac1fb598635a53787c08a152f3013f568af2c0b 100644 (file)
  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-/* $XFree86: xc/lib/GL/mesa/src/drv/tdfx/tdfx_context.c,v 1.12 2003/05/08 09:25:35 herrb Exp $ */
 
-/*
- * New fixes:
- *     Daniel Borca <dborca@users.sourceforge.net>, 19 Jul 2004
- *
- * Original rewrite:
- *     Gareth Hughes <gareth@valinux.com>, 29 Sep - 1 Oct 2000
- *
- * Authors:
- *     Gareth Hughes <gareth@valinux.com>
- *     Brian Paul <brianp@valinux.com>
+/**
+ * \file tdfx_context.c
+ * Context management functions for 3Dfx hardware.
  *
+ * \author Gareth Hughes <gareth@valinux.com> (original rewrite 29 Sep - 1 Oct 2000)
+ * \author Brian Paul <brianp@valinux.com>
+ * \author Daniel Borca <dborca@users.sourceforge.net> (new fixes 19 Jul 2004)
  */
 
 #include <dlfcn.h>
@@ -50,6 +45,7 @@
 #include "tdfx_texman.h"
 #include "extensions.h"
 #include "hash.h"
+#include "texobj.h"
 
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
@@ -602,7 +598,7 @@ tdfxDestroyContext( __DRIcontextPrivate *driContextPriv )
               id;
               id = _mesa_HashNextEntry(textures, id)) {
             struct gl_texture_object *tObj
-               = (struct gl_texture_object *) _mesa_HashLookup(textures, id);
+               = _mesa_lookup_texture(fxMesa->glCtx, id);
             tdfxTMFreeTexture(fxMesa, tObj);
          }
       }
@@ -702,6 +698,7 @@ tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv,
         UNLOCK_HARDWARE( newFx );
       }
 
+       driUpdateFramebufferSize(newCtx, driDrawPriv);
       _mesa_make_current( newCtx,
                           (GLframebuffer *) driDrawPriv->driverPrivate,
                           (GLframebuffer *) driReadPriv->driverPrivate );