updated fxDDGetString() for DRI
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 3.1
|
* Version: 3.3
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -102,7 +102,7 @@ void fxInitPixelTables(fxMesaContext fxMesa, GLboolean bgrOrder)
|
|||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
/* Enalbe/Disable dithering */
|
/* Enalbe/Disable dithering */
|
||||||
void fxDDDither(GLcontext *ctx, GLboolean enable)
|
static void fxDDDither(GLcontext *ctx, GLboolean enable)
|
||||||
{
|
{
|
||||||
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
if (MESA_VERBOSE&VERBOSE_DRIVER) {
|
||||||
fprintf(stderr,"fxmesa: fxDDDither()\n");
|
fprintf(stderr,"fxmesa: fxDDDither()\n");
|
||||||
@@ -117,7 +117,7 @@ void fxDDDither(GLcontext *ctx, GLboolean enable)
|
|||||||
|
|
||||||
|
|
||||||
/* Return buffer size information */
|
/* Return buffer size information */
|
||||||
void fxDDBufferSize(GLcontext *ctx, GLuint *width, GLuint *height)
|
static void fxDDBufferSize(GLcontext *ctx, GLuint *width, GLuint *height)
|
||||||
{
|
{
|
||||||
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
|
||||||
|
|
||||||
@@ -489,16 +489,45 @@ void fxDDSetNearFar(GLcontext *ctx, GLfloat n, GLfloat f)
|
|||||||
*/
|
*/
|
||||||
static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
|
static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
|
||||||
{
|
{
|
||||||
|
#if defined(GLX_DIRECT_RENDERING)
|
||||||
|
/* Building for DRI driver */
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case GL_RENDERER:
|
case GL_RENDERER:
|
||||||
#if defined(GLX_DIRECT_RENDERING)
|
{
|
||||||
return "Mesa Glide - DRI VB/V3";
|
static char buffer[100];
|
||||||
|
char hardware[100];
|
||||||
|
strcpy(hardware, grGetString(GR_HARDWARE));
|
||||||
|
if (strcmp(hardware, "Voodoo3 (tm)") == 0)
|
||||||
|
strcpy(hardware, "Voodoo3");
|
||||||
|
else if (strcmp(hardware, "Voodoo Banshee (tm)") == 0)
|
||||||
|
strcpy(hardware, "VoodooBanshee");
|
||||||
|
else {
|
||||||
|
/* unexpected result: replace spaces with hyphens */
|
||||||
|
int i;
|
||||||
|
for (i = 0; hardware[i]; i++) {
|
||||||
|
if (hardware[i] == ' ' || hardware[i] == '\t')
|
||||||
|
hardware[i] = '-';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* now make the GL_RENDERER string */
|
||||||
|
sprintf(buffer, "Mesa DRI %s 20000208", hardware);
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
case GL_VENDOR:
|
||||||
|
return "Precision Insight, Inc.";
|
||||||
|
default:
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
/* Building for Voodoo1/2 stand-alone Mesa */
|
||||||
|
switch (name) {
|
||||||
|
case GL_RENDERER:
|
||||||
{
|
{
|
||||||
static char buf[80];
|
static char buf[80];
|
||||||
|
|
||||||
if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO)
|
if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_VOODOO) {
|
||||||
{
|
|
||||||
GrVoodooConfig_t *vc =
|
GrVoodooConfig_t *vc =
|
||||||
&glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig;
|
&glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig;
|
||||||
|
|
||||||
@@ -512,8 +541,7 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
|
|||||||
vc->nTexelfx,
|
vc->nTexelfx,
|
||||||
(vc->sliDetect ? "SLI" : "NOSLI"));
|
(vc->sliDetect ? "SLI" : "NOSLI"));
|
||||||
}
|
}
|
||||||
else if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96)
|
else if (glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96) {
|
||||||
{
|
|
||||||
GrSst96Config_t *sc =
|
GrSst96Config_t *sc =
|
||||||
&glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config;
|
&glbHWConfig.SSTs[glbCurrentBoard].sstBoard.SST96Config;
|
||||||
|
|
||||||
@@ -525,17 +553,15 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
|
|||||||
sc->tmuConfig.tmuRam,
|
sc->tmuConfig.tmuRam,
|
||||||
sc->nTexelfx);
|
sc->nTexelfx);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
strcpy(buf, "Glide v0.30 UNKNOWN");
|
strcpy(buf, "Glide v0.30 UNKNOWN");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (GLubyte *) buf;
|
return (GLubyte *) buf;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user