Path: blob/21.2-virgl/src/intel/dev/intel_device_info_test.c
7086 views
#undef NDEBUG12#include <stdint.h>3#include <assert.h>45#include "intel_device_info.h"67int8main(int argc, char *argv[])9{10struct {11uint32_t pci_id;12const char *name;13} chipsets[] = {14#undef CHIPSET15#define CHIPSET(id, family, family_str, str_name) { .pci_id = id, .name = str_name, },16#include "pci_ids/i965_pci_ids.h"17#include "pci_ids/iris_pci_ids.h"18};1920for (uint32_t i = 0; i < ARRAY_SIZE(chipsets); i++) {21struct intel_device_info devinfo = { 0, };2223assert(intel_get_device_info_from_pci_id(chipsets[i].pci_id, &devinfo));2425assert(devinfo.ver != 0);26assert(devinfo.num_eu_per_subslice != 0);27assert(devinfo.num_thread_per_eu != 0);28assert(devinfo.timestamp_frequency != 0);29assert(devinfo.cs_prefetch_size > 0);30}3132return 0;33}343536