summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-08-18 19:51:11 +0000
committerIan Romanick <[email protected]>2005-08-18 19:51:11 +0000
commite918bac8cd85aaefaef5d534d53398257b7df0f9 (patch)
tree75a644af533d04c5074e8e935db0004c5a59a71a /src/mesa
parentaa2a357bae017e6e4b0ce1745ed4e9232b3c1684 (diff)
Make the i810 driver use driGetRendererString like all the other drivers.
The GL_RENDERER string now accurately contains the chip name. This was only tested on a "plain" i810 (PCI ID 8086:7121).
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index 38f6a2b4e18..f72842989e1 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -72,13 +72,30 @@ int I810_DEBUG = (0);
PUBLIC const char __driConfigOptions[] = { 0 };
const GLuint __driNConfigOptions = 0;
+#define DRIVER_DATE "20021125"
+
static const GLubyte *i810GetString( GLcontext *ctx, GLenum name )
{
+ static char buffer[128];
+
switch (name) {
case GL_VENDOR:
return (GLubyte *)"Keith Whitwell";
- case GL_RENDERER:
- return (GLubyte *)"Mesa DRI I810 20021125";
+ case GL_RENDERER: {
+ i810ContextPtr imesa = I810_CONTEXT(ctx);
+ const char * chipset;
+
+ switch (imesa->i810Screen->deviceID) {
+ case PCI_CHIP_I810: chipset = "i810"; break;
+ case PCI_CHIP_I810_DC100: chipset = "i810 DC-100"; break;
+ case PCI_CHIP_I810_E: chipset = "i810E"; break;
+ case PCI_CHIP_I815: chipset = "i815"; break;
+ default: chipset = "Unknown i810-class Chipset"; break;
+ }
+
+ (void) driGetRendererString( buffer, chipset, DRIVER_DATE, 0 );
+ return (GLubyte *) buffer;
+ }
default:
return 0;
}