From 2420318cd9d42e1dda43e9e6ffb0accae1ff6b02 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 19 Oct 2005 03:23:29 +0000 Subject: 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). --- src/mesa/drivers/dri/sis/sis_context.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mesa/drivers/dri/sis/sis_context.c') 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; } -- cgit v1.2.3