Commit c2134f94 authored by Jordan Justen's avatar Jordan Justen

intel/vulkan: Support INTEL_DEVID_OVERRIDE environment variable

Signed-off-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: D Scott Phillips's avatarScott D Phillips <scott.d.phillips@intel.com>
parent 843f6d18
......@@ -296,10 +296,16 @@ anv_physical_device_init(struct anv_physical_device *device,
device->no_hw = getenv("INTEL_NO_HW") != NULL;
device->chipset_id = anv_gem_get_param(fd, I915_PARAM_CHIPSET_ID);
if (!device->chipset_id) {
result = vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
goto fail;
const int pci_id_override = gen_get_pci_device_id_override();
if (pci_id_override < 0) {
device->chipset_id = anv_gem_get_param(fd, I915_PARAM_CHIPSET_ID);
if (!device->chipset_id) {
result = vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
goto fail;
}
} else {
device->chipset_id = pci_id_override;
device->no_hw = true;
}
device->name = gen_get_device_name(device->chipset_id);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment