summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/sis/sis_context.c
diff options
context:
space:
mode:
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;
}