i965: Fix type of gl_FragData[] dereference for FB write.
[mesa.git] / src / mesa / drivers / dri / mga / mgadd.c
index e8436f23846ed9c05396e875bfe861bf3a308efa..1b39813e37965b0fb72e27191a31e65c420429e3 100644 (file)
  * Authors:
  *    Keith Whitwell <keith@tungstengraphics.com>
  */
-/* $XFree86: xc/lib/GL/mesa/src/drv/mga/mgadd.c,v 1.14 2002/10/30 12:51:35 alanh Exp $ */
 
 
-#include "mtypes.h"
+#include "main/mtypes.h"
+#include "main/framebuffer.h"
+#include "main/mm.h"
 
-#include "mm.h"
 #include "mgacontext.h"
 #include "mgadd.h"
-#include "mgastate.h"
-#include "mgaspan.h"
-#include "mgatex.h"
-#include "mgatris.h"
-#include "mgavb.h"
 #include "mga_xmesa.h"
 #include "utils.h"
 
-#define DRIVER_DATE    "20030328"
+#define DRIVER_DATE    "20071017"
 
 
 /***************************************
@@ -48,7 +43,7 @@
  ***************************************/
 
 
-static const GLubyte *mgaGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *mgaGetString( struct gl_context *ctx, GLenum name )
 {
    mgaContextPtr mmesa = MGA_CONTEXT( ctx );
    static char buffer[128];
@@ -73,25 +68,7 @@ static const GLubyte *mgaGetString( GLcontext *ctx, GLenum name )
 }
 
 
-static void mgaBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
-{
-   GET_CURRENT_CONTEXT(ctx);
-   mgaContextPtr mmesa = MGA_CONTEXT(ctx);
-
-   /* Need to lock to make sure the driDrawable is uptodate.  This
-    * information is used to resize Mesa's software buffers, so it has
-    * to be correct.
-    */
-   LOCK_HARDWARE( mmesa );
-   *width = mmesa->driDrawable->w;
-   *height = mmesa->driDrawable->h;
-   UNLOCK_HARDWARE( mmesa );
-}
-
-
 void mgaInitDriverFuncs( struct dd_function_table *functions )
 {
-   functions->GetBufferSize = mgaBufferSize;
-   functions->ResizeBuffers = _swrast_alloc_buffers;
    functions->GetString = mgaGetString;
 }