* 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"
/***************************************
***************************************/
-static const GLubyte *mgaDDGetString( GLcontext *ctx, GLenum name )
+static const GLubyte *mgaGetString( struct gl_context *ctx, GLenum name )
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
static char buffer[128];
}
-
-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 mgaDDInitDriverFuncs( GLcontext *ctx )
+void mgaInitDriverFuncs( struct dd_function_table *functions )
{
- ctx->Driver.GetBufferSize = mgaBufferSize;
- ctx->Driver.ResizeBuffers = _swrast_alloc_buffers;
- ctx->Driver.GetString = mgaDDGetString;
+ functions->GetString = mgaGetString;
}