Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/intel/dev/intel_device_info_test.c
7086 views
1
#undef NDEBUG
2
3
#include <stdint.h>
4
#include <assert.h>
5
6
#include "intel_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, family_str, str_name) { .pci_id = id, .name = str_name, },
17
#include "pci_ids/i965_pci_ids.h"
18
#include "pci_ids/iris_pci_ids.h"
19
};
20
21
for (uint32_t i = 0; i < ARRAY_SIZE(chipsets); i++) {
22
struct intel_device_info devinfo = { 0, };
23
24
assert(intel_get_device_info_from_pci_id(chipsets[i].pci_id, &devinfo));
25
26
assert(devinfo.ver != 0);
27
assert(devinfo.num_eu_per_subslice != 0);
28
assert(devinfo.num_thread_per_eu != 0);
29
assert(devinfo.timestamp_frequency != 0);
30
assert(devinfo.cs_prefetch_size > 0);
31
}
32
33
return 0;
34
}
35
36