summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2019-12-17 02:57:55 -0800
committerKenneth Graunke <kenneth@whitecape.org>2020-01-13 19:42:30 -0800
commitf63d6260d1b570e936c7da587b0028f10368116b (patch)
tree0b85fe6bf7938eda47db7c0da5372bfee565cdb8
parent44bad9c31a11ca7bf67cba7eaa094963b5f5a2f7 (diff)
iris: Simplify iris_get_renderer_string()
We use gen_get_device_name() instead of PCI ID list munging. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3371>
-rw-r--r--src/gallium/drivers/iris/iris_screen.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index cbefa9dfb13..a566c58b05f 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -80,19 +80,12 @@ iris_get_name(struct pipe_screen *pscreen)
{
struct iris_screen *screen = (struct iris_screen *)pscreen;
static char buf[128];
- const char *chipset;
+ const char *name = gen_get_device_name(screen->pci_id);
- switch (screen->pci_id) {
-#undef CHIPSET
-#define CHIPSET(id, symbol, str) case id: chipset = str; break;
-#include "pci_ids/i965_pci_ids.h"
-#include "pci_ids/iris_pci_ids.h"
- default:
- chipset = "Unknown Intel Chipset";
- break;
- }
+ if (!name)
+ name = "Intel Unknown";
- snprintf(buf, sizeof(buf), "Mesa %s", chipset);
+ snprintf(buf, sizeof(buf), "Mesa %s", name);
return buf;
}