Commit 6d365f84 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Gpu tests: Allow zero device ID on in Mac GPUTestBotConfig::SetGPUInfo

The ARM DTK does not specify a PCI device ID for the GPU. Do not fail
in this configuration. There are other places, GPUTestConfig::IsValid,
for instance, where we explicit allow a zero device ID.

Of note is that zero device IDs are allowed only when there is a
single GPU. ANGLE's current enumeration code will only enumerate
non-PCI devices once no PCI devices are found, so this is will
continue to work for the moment.

Bug: 1110421, 1121663, 1121672
Change-Id: I7cba1c4d074c291663913b970db3e4085afa0adc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387308Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803553}
parent 6a449181
...@@ -191,8 +191,14 @@ void GPUTestBotConfig::AddGPUVendor(uint32_t gpu_vendor) { ...@@ -191,8 +191,14 @@ void GPUTestBotConfig::AddGPUVendor(uint32_t gpu_vendor) {
} }
bool GPUTestBotConfig::SetGPUInfo(const GPUInfo& gpu_info) { bool GPUTestBotConfig::SetGPUInfo(const GPUInfo& gpu_info) {
if (gpu_info.gpu.device_id == 0 || gpu_info.gpu.vendor_id == 0) if (gpu_info.gpu.vendor_id == 0)
return false; return false;
#if !defined(OS_MAC)
// ARM-based Mac GPUs do not have valid PCI device IDs.
// https://crbug.com/1110421
if (gpu_info.gpu.device_id == 0)
return false;
#endif
ClearGPUVendor(); ClearGPUVendor();
AddGPUVendor(gpu_info.gpu.vendor_id); AddGPUVendor(gpu_info.gpu.vendor_id);
set_gpu_device_id(gpu_info.gpu.device_id); set_gpu_device_id(gpu_info.gpu.device_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