summaryrefslogtreecommitdiff
path: root/xc/lib/GL/mesa/src/drv/mga/mgadd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/lib/GL/mesa/src/drv/mga/mgadd.c')
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgadd.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgadd.c b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
index 70e53efa8..0e89a928f 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgadd.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
@@ -35,10 +35,8 @@
#include <stdlib.h>
#include "mm.h"
-#include "mgalib.h"
-#include "mgaclear.h"
+#include "mgacontext.h"
#include "mgadd.h"
-#include "mgalog.h"
#include "mgastate.h"
#include "mgaspan.h"
#include "mgatex.h"
@@ -74,24 +72,28 @@ static const GLubyte *mgaDDGetString( GLcontext *ctx, GLenum name )
static GLint mgaGetParameteri(const GLcontext *ctx, GLint param)
{
- switch (param) {
- case DD_HAVE_HARDWARE_FOG:
- return 1;
- default:
- mgaError("mgaGetParameteri(): unknown parameter!\n");
- return 0;
- }
+ switch (param) {
+ case DD_HAVE_HARDWARE_FOG:
+ return 1;
+ default:
+ fprintf(stderr, "mgaGetParameteri(): unknown parameter!\n");
+ return 0;
+ }
}
static void mgaBufferSize(GLcontext *ctx, GLuint *width, GLuint *height)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
-
-/* LOCK_HARDWARE( mmesa ); */
+
+ /* 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 ); */
+ UNLOCK_HARDWARE( mmesa );
}
void mgaDDExtensionsInit( GLcontext *ctx )
@@ -104,8 +106,6 @@ void mgaDDExtensionsInit( GLcontext *ctx )
*/
if (1 || !MGA_IS_G400(MGA_CONTEXT(ctx)))
{
- gl_extensions_disable( ctx, "GL_EXT_multitexture" );
- gl_extensions_disable( ctx, "GL_SGIS_multitexture" );
gl_extensions_disable( ctx, "GL_ARB_multitexture" );
}
@@ -141,10 +141,6 @@ void mgaDDExtensionsInit( GLcontext *ctx )
-
-
-
-
void mgaDDInitDriverFuncs( GLcontext *ctx )
{
ctx->Driver.GetBufferSize = mgaBufferSize;