iris: Implement INTEL_DEBUG=pc for pipe control logging.
[mesa.git] / src / intel / dev / gen_device_info_test.c
1 #undef NDEBUG
2
3 #include <stdint.h>
4 #include <assert.h>
5
6 #include "gen_device_info.h"
7
8 int
9 main(int argc, char *argv[])
10 {
11 struct {
12 uint32_t pci_id;
13 const char *name;
14 } chipsets[] = {
15 #undef CHIPSET
16 #define CHIPSET(id, family, str_name) { .pci_id = id, .name = str_name, },
17 #include "pci_ids/i965_pci_ids.h"
18 };
19
20 for (uint32_t i = 0; i < ARRAY_SIZE(chipsets); i++) {
21 struct gen_device_info devinfo = { 0, };
22
23 assert(gen_get_device_info(chipsets[i].pci_id, &devinfo));
24
25 assert(devinfo.gen != 0);
26 assert(devinfo.urb.size != 0);
27 assert(devinfo.num_eu_per_subslice != 0);
28 assert(devinfo.num_thread_per_eu != 0);
29 assert(devinfo.timestamp_frequency != 0);
30 }
31
32 return 0;
33 }