From f63d6260d1b570e936c7da587b0028f10368116b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 17 Dec 2019 02:57:55 -0800 Subject: [PATCH] iris: Simplify iris_get_renderer_string() We use gen_get_device_name() instead of PCI ID list munging. Reviewed-by: Matt Turner Reviewed-by: Caio Marcelo de Oliveira Filho Reviewed-by: Jordan Justen Part-of: --- src/gallium/drivers/iris/iris_screen.c | 15 ++++----------- 1 file 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; } -- 2.30.2