Module: Mesa Branch: master Commit: 46c0b899f6e511657acb7b6fc32a23c2e50c551e URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=46c0b899f6e511657acb7b6fc32a23c2e50c551e
Author: Jason Ekstrand <[email protected]> Date: Mon Apr 4 14:50:03 2016 -0700 brw/device_info: Add a helper for getting a device name This is needed by the Vulkan driver Reviewed-by: Jordan Justen <[email protected]> --- src/mesa/drivers/dri/i965/brw_device_info.c | 12 ++++++++++++ src/mesa/drivers/dri/i965/brw_device_info.h | 1 + 2 files changed, 13 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c index c703fb5..3666190 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 c641ffc..4e7f313 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); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
