| 28 | #include <devinfo.h> |
| 29 | |
| 30 | static DeviceVendor |
| 31 | stringToVendor(const char *str) |
| 32 | { |
| 33 | DeviceVendor vendor; |
| 34 | |
| 35 | if (!strcmp(str, "Advanced Micro Devices, Inc.")) { |
| 36 | vendor = VENDOR_AMD; |
| 37 | } |
| 38 | else if (!strcmp(str, "NVIDIA Corporation")) { |
| 39 | vendor = VENDOR_NVIDIA; |
| 40 | } |
| 41 | else { |
| 42 | vendor = VENDOR_UNKNOWN; |
| 43 | } |
| 44 | |
| 45 | return vendor; |
| 46 | } |
| 47 | |
| 48 | static DeviceChip |
| 49 | stringToChip(const char *str) |