Add the no_rast debug option, which I used in some testing.
authorEric Anholt <anholt@FreeBSD.org>
Mon, 30 May 2005 03:32:52 +0000 (03:32 +0000)
committerEric Anholt <anholt@FreeBSD.org>
Mon, 30 May 2005 03:32:52 +0000 (03:32 +0000)
src/mesa/drivers/dri/mga/mga_xmesa.c
src/mesa/drivers/dri/mga/mgacontext.h

index d32934b06bdce48ca741f4f1fba1a7caae8dfd4d..aa4cfe5ccde94d69903c2575dbd42d4f1c96450f 100644 (file)
@@ -85,8 +85,11 @@ DRI_CONF_BEGIN
         DRI_CONF_ARB_VERTEX_PROGRAM(true)
         DRI_CONF_NV_VERTEX_PROGRAM(true)
     DRI_CONF_SECTION_END
+    DRI_CONF_SECTION_DEBUG
+        DRI_CONF_NO_RAST(false)
+    DRI_CONF_SECTION_END
 DRI_CONF_END;
-static const GLuint __driNConfigOptions = 5;
+static const GLuint __driNConfigOptions = 6;
 
 #ifdef USE_NEW_INTERFACE
 static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
@@ -640,6 +643,11 @@ mgaCreateContext( const __GLcontextModes *mesaVis,
 
    (*mmesa->get_ust)( & mmesa->swap_ust );
 
+   if (driQueryOptionb(&mmesa->optionCache, "no_rast")) {
+      fprintf(stderr, "disabling 3D acceleration\n");
+      FALLBACK(mmesa->glCtx, MGA_FALLBACK_DISABLE, 1);
+   }
+
    return GL_TRUE;
 }
 
index 602f8aca9d4d6efa6b3703e5c5e94a8603d8c417..72c1841fedd05494946129b4b3be1ffc793bbe78 100644 (file)
@@ -62,6 +62,7 @@
 #define MGA_FALLBACK_STENCIL        0x20
 #define MGA_FALLBACK_DEPTH          0x40
 #define MGA_FALLBACK_BORDER_MODE    0x80
+#define MGA_FALLBACK_DISABLE        0x100
 
 
 /* Use the templated vertex formats: