summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2004-10-13 22:36:26 +0000
committerIan Romanick <[email protected]>2004-10-13 22:36:26 +0000
commit82f2e80f14240aae25b23744264c6ebc5af00536 (patch)
tree451e693f03bb7496b2cd66d6c28d3a367425c37e /src/mesa/drivers/dri/unichrome
parent447cdd536fe4539b724e8a7024659e3f4cd724d1 (diff)
Make the GL_RENDERER string include the actual chipset information
instead of always saying "CLE266".
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index bae15cd5b56..f058424e64d 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -55,6 +55,7 @@
#include "via_vb.h"
#include "via_ioctl.h"
#include "via_fb.h"
+#include "via_regs.h"
#include <stdio.h>
#include "macros.h"
@@ -108,12 +109,6 @@ AllocateBuffer(viaContextPtr vmesa)
/**
* Return various strings for \c glGetString.
- *
- * \todo
- * This function should look at the PCI ID of the chipset to determine what
- * name to use. Users with a KM400, for example, might get confused when
- * the driver says "CLE266". Having the correct information may also help
- * folks on the DRI mailing lists debug problems for people.
*
* \sa glGetString
*/
@@ -127,9 +122,22 @@ static const GLubyte *viaGetString(GLcontext *ctx, GLenum name)
case GL_VENDOR:
return (GLubyte *)"VIA Technology";
- case GL_RENDERER:
- offset = driGetRendererString( buffer, "CLE266", DRIVER_DATE, 0 );
+ case GL_RENDERER: {
+ static const char * const chipset_names[] = {
+ "UniChrome",
+ "CastleRock (CLE266)",
+ "UniChrome (KM400)",
+ "UniChrome (K8M800)",
+ "UniChrome (PM8x0/CN400)",
+ };
+ const viaContext * const via = VIA_CONTEXT(ctx);
+ const unsigned id = via->viaScreen->deviceID;
+
+ offset = driGetRendererString( buffer,
+ chipset_names[(id > VIA_PM800) ? 0 : id],
+ DRIVER_DATE, 0 );
return (GLubyte *)buffer;
+ }
default:
return NULL;