diff options
author | Jordan Justen <[email protected]> | 2018-02-09 18:38:28 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2018-02-27 11:15:10 -0800 |
commit | c2134f94c8a819cd100e503cf56cbe6fe11a6a2f (patch) | |
tree | 249b42ff934c61807ec5d2be1f31c0ff5021aaad /src/intel/vulkan | |
parent | 843f6d187a2896386a6fb8c17daed378aefbdb91 (diff) |
intel/vulkan: Support INTEL_DEVID_OVERRIDE environment variable
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Scott D Phillips <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index dd5f2f49286..8be88acc52c 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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); |