const char *
brw_get_renderer_string(const struct intel_screen *screen)
{
- const char *chipset;
- static char buffer[128];
- char *bsw = NULL;
-
- switch (screen->deviceID) {
-#undef CHIPSET
-#define CHIPSET(id, symbol, str) case id: chipset = str; break;
-#include "pci_ids/i965_pci_ids.h"
- default:
- chipset = "Unknown Intel Chipset";
- break;
- }
+ static char buf[128];
+ const char *name = gen_get_device_name(screen->deviceID);
+
+ if (!name)
+ name = "Intel Unknown";
+
+ snprintf(buf, sizeof(buf), "Mesa DRI %s", name);
/* Braswell branding is funny, so we have to fix it up here */
if (screen->deviceID == 0x22B1) {
- bsw = strdup(chipset);
- char *needle = strstr(bsw, "XXX");
- if (needle) {
+ char *needle = strstr(buf, "XXX");
+ if (needle)
memcpy(needle, get_bsw_model(screen), 3);
- chipset = bsw;
- }
}
- (void) driGetRendererString(buffer, chipset, 0);
- free(bsw);
- return buffer;
+ return buf;
}
static const GLubyte *