mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
Add no_rast option.
This commit is contained in:
parent
502504de23
commit
d638f6a0bb
5 changed files with 43 additions and 10 deletions
|
|
@ -62,9 +62,6 @@
|
|||
|
||||
#include "utils.h"
|
||||
|
||||
PUBLIC const char __driConfigOptions[] = { 0 };
|
||||
const GLuint __driNConfigOptions = 0;
|
||||
|
||||
/**
|
||||
* Common extension strings exported by all cards
|
||||
*/
|
||||
|
|
@ -155,7 +152,6 @@ static const struct tnl_pipeline_stage *tdfx_pipeline[] = {
|
|||
0,
|
||||
};
|
||||
|
||||
|
||||
GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis,
|
||||
__DRIcontextPrivate *driContextPriv,
|
||||
void *sharedContextPrivate )
|
||||
|
|
@ -221,6 +217,10 @@ GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis,
|
|||
fxMesa->new_state = ~0;
|
||||
fxMesa->dirty = ~0;
|
||||
|
||||
/* Parse configuration files */
|
||||
driParseConfigFiles (&fxMesa->optionCache, &fxScreen->optionCache,
|
||||
fxMesa->driScreen->myNum, "tdfx");
|
||||
|
||||
/* NOTE: This must be here before any Glide calls! */
|
||||
if (!tdfxInitGlide( fxMesa )) {
|
||||
FREE(fxMesa);
|
||||
|
|
@ -320,6 +320,11 @@ GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis,
|
|||
tdfxInitVB( ctx );
|
||||
tdfxInitState( fxMesa );
|
||||
|
||||
if (driQueryOptionb(&fxMesa->optionCache, "no_rast")) {
|
||||
fprintf(stderr, "disabling 3D acceleration\n");
|
||||
FALLBACK(fxMesa, TDFX_FALLBACK_DISABLE, 1);
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
#include "drm.h"
|
||||
#include "drm_sarea.h"
|
||||
#include "tdfx_glide.h"
|
||||
#include "xmlconfig.h"
|
||||
|
||||
#include "clip.h"
|
||||
#include "context.h"
|
||||
|
|
@ -141,6 +142,7 @@
|
|||
#define TDFX_FALLBACK_COLORMASK 0x0100
|
||||
#define TDFX_FALLBACK_BLEND 0x0200
|
||||
#define TDFX_FALLBACK_LINE_STIPPLE 0x0400
|
||||
#define TDFX_FALLBACK_DISABLE 0x0800
|
||||
|
||||
/* Different Glide vertex layouts
|
||||
*/
|
||||
|
|
@ -918,6 +920,10 @@ struct tdfx_context {
|
|||
tdfxStats stats;
|
||||
|
||||
GLboolean debugFallbacks;
|
||||
|
||||
/* Configuration cache
|
||||
*/
|
||||
driOptionCache optionCache;
|
||||
};
|
||||
|
||||
#define TDFX_CONTEXT(ctx) ((tdfxContextPtr)((ctx)->DriverCtx))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ typedef struct {
|
|||
|
||||
__DRIscreenPrivate *driScrnPriv;
|
||||
unsigned int sarea_priv_offset;
|
||||
|
||||
/* Configuration cache with default values for all contexts */
|
||||
driOptionCache optionCache;
|
||||
} tdfxScreenPrivate;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1214,6 +1214,7 @@ static char *fallbackStrings[] = {
|
|||
"glColorMask",
|
||||
"blend mode",
|
||||
"line stipple"
|
||||
"Rasterization disable"
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue