summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/tdfx/tdfx_screen.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-06-01 07:44:52 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-06-01 07:44:52 +0000
commitd638f6a0bbc7df246700ed78c11837af6e6c6246 (patch)
tree4a5241cebaeeaa0e91802be995557b8c055f4a4c /src/mesa/drivers/dri/tdfx/tdfx_screen.c
parent502504de2336a64698be544c83697632e4628138 (diff)
Add no_rast option.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_screen.c')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index b911668b4e..fde17f1a87 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -40,9 +40,12 @@
#include "tdfx_vb.h"
#include "tdfx_span.h"
#include "tdfx_tris.h"
-#include "utils.h"
+
#include "framebuffer.h"
#include "renderbuffer.h"
+#include "xmlpool.h"
+
+#include "utils.h"
#ifdef DEBUG_LOCKING
char *prevLockFile = 0;
@@ -61,7 +64,14 @@ int TDFX_DEBUG = (0
);
#endif
+PUBLIC const char __driConfigOptions[] =
+DRI_CONF_BEGIN
+ DRI_CONF_SECTION_DEBUG
+ DRI_CONF_NO_RAST(false)
+ DRI_CONF_SECTION_END
+DRI_CONF_END;
+static const GLuint __driNConfigOptions = 1;
static GLboolean
tdfxCreateScreen( __DRIscreenPrivate *sPriv )
@@ -74,6 +84,10 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv )
if ( !fxScreen )
return GL_FALSE;
+ /* parse information in __driConfigOptions */
+ driParseOptionInfo (&fxScreen->optionCache,
+ __driConfigOptions, __driNConfigOptions);
+
fxScreen->driScrnPriv = sPriv;
sPriv->private = (void *) fxScreen;
@@ -108,12 +122,16 @@ tdfxDestroyScreen( __DRIscreenPrivate *sPriv )
{
tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
- if ( fxScreen ) {
- drmUnmap( fxScreen->regs.map, fxScreen->regs.size );
+ if (!fxScreen)
+ return;
- FREE( fxScreen );
- sPriv->private = NULL;
- }
+ drmUnmap( fxScreen->regs.map, fxScreen->regs.size );
+
+ /* free all option information */
+ driDestroyOptionInfo (&fxScreen->optionCache);
+
+ FREE( fxScreen );
+ sPriv->private = NULL;
}