mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
This knowledge was repeated in multiple places so move the values to intel_device_info struct. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13014>
36 lines
877 B
C
36 lines
877 B
C
#undef NDEBUG
|
|
|
|
#include <stdint.h>
|
|
#include <assert.h>
|
|
|
|
#include "intel_device_info.h"
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
struct {
|
|
uint32_t pci_id;
|
|
const char *name;
|
|
} chipsets[] = {
|
|
#undef CHIPSET
|
|
#define CHIPSET(id, family, family_str, str_name) { .pci_id = id, .name = str_name, },
|
|
#include "pci_ids/i965_pci_ids.h"
|
|
#include "pci_ids/iris_pci_ids.h"
|
|
};
|
|
|
|
for (uint32_t i = 0; i < ARRAY_SIZE(chipsets); i++) {
|
|
struct intel_device_info devinfo = { 0, };
|
|
|
|
assert(intel_get_device_info_from_pci_id(chipsets[i].pci_id, &devinfo));
|
|
|
|
assert(devinfo.ver != 0);
|
|
assert(devinfo.num_eu_per_subslice != 0);
|
|
assert(devinfo.num_thread_per_eu != 0);
|
|
assert(devinfo.timestamp_frequency != 0);
|
|
assert(devinfo.cs_prefetch_size > 0);
|
|
|
|
assert(devinfo.ver < 7 || devinfo.max_constant_urb_size_kb > 0);
|
|
}
|
|
|
|
return 0;
|
|
}
|