summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/sis/sis_context.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-10-19 03:23:29 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-10-19 03:23:29 +0000
commit2420318cd9d42e1dda43e9e6ffb0accae1ff6b02 (patch)
tree56100db0cab3f1325ee272236b5408a655163b86 /src/mesa/drivers/dri/sis/sis_context.c
parente0cb784e03530d2c806e74b3ac9b66021b5791ce (diff)
Make SiS a little more like other drivers: Add SIS_DEBUG (only option being
"fall" so far) and make the fallback_force option be no_rast like other drivers. Incidentally, makes no_rast not crash (though it still fails to render).
Diffstat (limited to 'src/mesa/drivers/dri/sis/sis_context.c')
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index 101b97b7b8..948f15a941 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -61,6 +61,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_ARB_multisample
#include "extension_helper.h"
+#ifndef SIS_DEBUG
+int SIS_DEBUG = 0;
+#endif
+
int GlobalCurrentHwcx = -1;
int GlobalHwcxCountBase = 1;
int GlobalCmdQueueLen = 0;
@@ -74,6 +78,12 @@ struct dri_extension card_extensions[] =
{ NULL, NULL }
};
+static const struct dri_debug_control debug_control[] =
+{
+ { "fall", DEBUG_FALLBACKS },
+ { NULL, 0 }
+};
+
void
WaitEngIdle (sisContextPtr smesa)
{
@@ -200,6 +210,10 @@ sisCreateContext( const __GLcontextModes *glVisual,
driParseConfigFiles (&smesa->optionCache, &sisScreen->optionCache,
sisScreen->driScreen->myNum, "sis");
+#if DO_DEBUG
+ SIS_DEBUG = driParseDebugString(getenv("SIS_DEBUG"), debug_control);
+#endif
+
/* TODO: index mode */
smesa->CurrentQueueLenPtr = &(smesa->sarea->QueueLength);
@@ -269,6 +283,11 @@ sisCreateContext( const __GLcontextModes *glVisual,
smesa->PrevTexFormat[i] = 0;
}
+ if (driQueryOptionb(&smesa->optionCache, "no_rast")) {
+ fprintf(stderr, "disabling 3D acceleration\n");
+ FALLBACK(smesa, SIS_FALLBACK_DISABLE, 1);
+ }
+
return GL_TRUE;
}