brw/device_info: Add a helper for getting a device name
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Apr 2016 21:50:03 +0000 (14:50 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 7 Apr 2016 01:08:56 +0000 (18:08 -0700)
This is needed by the Vulkan driver

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_device_info.c
src/mesa/drivers/dri/i965/brw_device_info.h

index c703fb5d4cf4f5f9c9aa3722bdcffd56e966a434..3666190fc363aecf3d7b1a4092afdf32ac573001 100644 (file)
@@ -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;
+   }
+}
index c641ffc281e921ecc0b53729b838f312600ca0c3..4e7f3135960c912683203247963d420c3e2af32c 100644 (file)
@@ -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);