From: Ian Romanick Date: Thu, 18 Aug 2005 19:51:11 +0000 (+0000) Subject: Make the i810 driver use driGetRendererString like all the other drivers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e918bac8cd85aaefaef5d534d53398257b7df0f9;p=mesa.git 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). --- 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; }