From e918bac8cd85aaefaef5d534d53398257b7df0f9 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Aug 2005 19:51:11 +0000 Subject: 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). --- src/mesa/drivers/dri/i810/i810context.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c index 38f6a2b4e1..f72842989e 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; } -- cgit v1.2.3