From: Jason Ekstrand Date: Mon, 4 Apr 2016 21:50:03 +0000 (-0700) Subject: brw/device_info: Add a helper for getting a device name X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c5a9b7bf6bc912143f6fa9088c1e6ec415ff3bb;p=mesa.git brw/device_info: Add a helper for getting a device name This is needed by the Vulkan driver Reviewed-by: Jordan Justen Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c index c703fb5d4cf..3666190fc36 100644 --- a/src/mesa/drivers/dri/i965/brw_device_info.c +++ b/src/mesa/drivers/dri/i965/brw_device_info.c @@ -482,3 +482,15 @@ brw_get_device_info(int devid) return devinfo; } + +const char * +brw_get_device_name(int devid) +{ + switch (devid) { +#undef CHIPSET +#define CHIPSET(id, family, name) case id: return name; +#include "pci_ids/i965_pci_ids.h" + default: + return NULL; + } +} diff --git a/src/mesa/drivers/dri/i965/brw_device_info.h b/src/mesa/drivers/dri/i965/brw_device_info.h index c641ffc281e..4e7f3135960 100644 --- a/src/mesa/drivers/dri/i965/brw_device_info.h +++ b/src/mesa/drivers/dri/i965/brw_device_info.h @@ -144,3 +144,4 @@ struct brw_device_info }; const struct brw_device_info *brw_get_device_info(int devid); +const char *brw_get_device_name(int devid);